/**
 * Frontend styles for SP-Category Manager - RTL Hebrew Layout
 * Colors: #083043 (dark blue), #d7e4ea (light blue-gray)
 */

.sp-categories-container {
    margin: 20px 0;
    overflow-x: auto;
    direction: rtl;
}

.sp-categories-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(8, 48, 67, 0.15);
    direction: rtl;
}

.sp-categories-table thead {
    background: #083043;
    color: white;
}

.sp-categories-table th {
    padding: 15px 12px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.sp-categories-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.sp-categories-table tbody tr:hover {
    background-color: #d7e4ea;
}

.sp-categories-table tbody tr:last-child {
    border-bottom: none;
}

.sp-categories-table td {
    padding: 15px 12px;
    vertical-align: middle;
    text-align: right;
}

/* Category Image Cell */
.sp-category-image-cell {
    width: 120px;
    text-align: center;
}

.sp-category-image-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(8, 48, 67, 0.1);
}

.sp-category-image-placeholder {
    width: 100px;
    height: 100px;
    background: #d7e4ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #083043;
    font-size: 12px;
    border-radius: 8px;
}

/* Category Info Cell */
.sp-category-info-cell {
    min-width: 200px;
}

.sp-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.sp-category-name a {
    color: #083043;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sp-category-name a:hover {
    color: #5a6c75;
}

.sp-category-hierarchy {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.sp-category-description {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

/* First Product Cell */
.sp-first-product-cell {
    min-width: 180px;
}

.sp-product-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #d7e4ea;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.sp-product-mini:hover {
    background: #c5d6dd;
}

.sp-product-mini-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.sp-product-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-product-mini-info {
    flex: 1;
    min-width: 0;
}

.sp-product-mini-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.sp-product-mini-price {
    font-size: 12px;
    color: #083043;
    font-weight: 600;
}

/* Actions Cell */
.sp-category-actions-cell {
    width: 150px;
    text-align: center;
}

.sp-view-all-btn-table {
    display: inline-block;
    padding: 8px 16px;
    background: #083043;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(8, 48, 67, 0.2);
}

.sp-view-all-btn-table:hover {
    background: #0a3a4f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 48, 67, 0.3);
    color: white;
}

/* Mobile Responsive Design - Card Layout */
@media (max-width: 768px) {

    /* Hide table headers on mobile */
    .sp-categories-table thead {
        display: none;
    }

    /* Convert table to card layout */
    .sp-categories-table,
    .sp-categories-table tbody,
    .sp-categories-table tr {
        display: block;
        width: 100%;
    }

    .sp-categories-table tr {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(8, 48, 67, 0.1);
        position: relative;
    }

    .sp-categories-table tr:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(8, 48, 67, 0.15);
    }

    .sp-categories-table td {
        display: block;
        width: 100% !important;
        padding: 8px 0;
        border: none;
        text-align: right;
        position: relative;
    }

    /* Add labels before content */
    .sp-categories-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #083043;
        display: block;
        margin-bottom: 5px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Category image styling for mobile */
    .sp-category-image-cell {
        text-align: center;
        margin-bottom: 10px;
    }

    .sp-category-image-cell:before {
        display: none;
    }

    .sp-category-image-wrapper {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .sp-category-image-placeholder {
        width: 80px;
        height: 80px;
        font-size: 11px;
    }

    /* Category info styling */
    .sp-category-info-cell {
        margin-bottom: 15px;
    }

    .sp-category-name {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .sp-category-hierarchy {
        font-size: 11px;
        margin-bottom: 5px;
    }

    /* First product styling */
    .sp-first-product-cell .sp-product-mini {
        background: #d7e4ea;
        padding: 10px;
        border-radius: 8px;
    }

    /* Actions styling */
    .sp-category-actions-cell {
        text-align: center;
        margin-top: 10px;
    }

    .sp-category-actions-cell:before {
        display: none;
    }

    .sp-view-all-btn-table {
        display: block;
        width: 100%;
        padding: 12px;
        font-size: 14px;
        text-align: center;
    }
}

/* RTL specific adjustments */
.sp-categories-table th:first-child,
.sp-categories-table td:first-child {
    text-align: center;
}

.sp-categories-table th:last-child,
.sp-categories-table td:last-child {
    text-align: center;
}

/* Hebrew font support */
.sp-categories-table {
    font-family: 'Arial Hebrew', 'David Libre', 'Rubik', Tahoma, sans-serif;
}

/* Extra small screens */
@media (max-width: 480px) {
    .sp-categories-table tr {
        padding: 12px;
        margin-bottom: 12px;
    }

    .sp-category-name {
        font-size: 16px;
    }

    .sp-category-hierarchy {
        font-size: 10px;
    }

    .sp-view-all-btn-table {
        padding: 10px;
        font-size: 13px;
    }

    /* Product table adjustments for small screens */
    .sp-category-products-table tr {
        padding: 12px;
        margin-bottom: 12px;
    }

    .sp-product-name {
        font-size: 15px;
    }

    .sp-product-description {
        font-size: 12px;
    }

    .sp-product-price-cell {
        font-size: 16px;
        padding: 8px;
    }

    .sp-view-product-btn,
    .sp-add-to-cart-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* Grid Styles */
.sp-categories-grid-container {
    margin: 30px 0;
}

.sp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    direction: rtl;
}

.sp-category-grid-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(8, 48, 67, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sp-category-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(8, 48, 67, 0.2);
}

.sp-category-grid-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.sp-category-grid-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    /* 4:3 ratio */
    position: relative;
    overflow: hidden;
}

.sp-category-grid-image-wrapper img,
.sp-category-grid-image-wrapper .sp-category-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-category-image-placeholder {
    background: #d7e4ea;
    color: #083043;
    font-weight: 600;
    font-size: 14px;
}

.sp-category-grid-name {
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    margin: 0;
    color: #083043;
    font-family: 'Arial Hebrew', 'David Libre', 'Rubik', Tahoma, sans-serif;
}

.sp-categories-grid-container {
    margin: 30px 0;
}

.sp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    direction: rtl;
}

.sp-category-grid-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(8, 48, 67, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sp-category-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(8, 48, 67, 0.2);
}

.sp-category-grid-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    /* 4:3 ratio */
    position: relative;
    overflow: hidden;
}

.sp-category-grid-image-wrapper img,
.sp-category-grid-image-wrapper .sp-category-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}




.sp-category-grid-name {
    font-size: 16px;
    font-weight: 600;
    padding: 12px;
    margin: 0;
    color: #083043;
    font-family: 'Arial Hebrew', 'David Libre', 'Rubik', Tahoma, sans-serif;
}

/* Keep existing Product Table Styles below */
/* Product Table Styles */
.sp-category-products-container {
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(8, 48, 67, 0.1);
    overflow: hidden;
}

.sp-category-products-container h2 {
    padding: 20px;
    margin: 0;
    background: #083043;
    color: white;
    font-size: 20px;
    text-align: right;
    font-family: 'Arial Hebrew', 'David Libre', 'Rubik', Tahoma, sans-serif;
}

.sp-category-products-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: 'Arial Hebrew', 'David Libre', 'Rubik', Tahoma, sans-serif;
    direction: rtl;
}

.sp-category-products-table th,
.sp-category-products-table td {
    padding: 15px 12px;
    text-align: right;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.sp-category-products-table th {
    background: #d7e4ea;
    font-weight: 600;
    color: #083043;
    font-size: 14px;
}

.sp-category-products-table tr:hover {
    background-color: #d7e4ea;
}

/* Product Image Cell */
.sp-product-image-cell {
    width: 100px;
    text-align: center;
}

.sp-product-image-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(8, 48, 67, 0.1);
}

.sp-product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-product-image-placeholder {
    width: 80px;
    height: 80px;
    background: #d7e4ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #083043;
    font-size: 11px;
    border-radius: 8px;
}

/* Product Name Cell */
.sp-product-name-cell {
    min-width: 200px;
}

.sp-product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.sp-product-name a {
    color: #083043;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sp-product-name a:hover {
    color: #5a6c75;
}

.sp-product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Product Price Cell */
.sp-product-price-cell {
    font-size: 16px;
    font-weight: 600;
    color: #083043;
    white-space: nowrap;
}

/* Product Actions Cell */
.sp-product-actions-cell {
    width: 180px;
    text-align: center;
}

.sp-view-product-btn,
.sp-add-to-cart-btn {
    display: inline-block;
    margin: 2px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.sp-view-product-btn {
    background: #083043;
    color: white;
}

.sp-add-to-cart-btn {
    background: #d7e4ea;
    color: #083043;
    border: 1px solid #083043;
}

.sp-view-product-btn:hover {
    background: #0a3a4f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 48, 67, 0.3);
}

.sp-add-to-cart-btn:hover {
    background: #083043;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 48, 67, 0.3);
}

/* Responsive Product Table - Mobile Card Layout */
@media (max-width: 768px) {
    .sp-category-products-container {
        margin: 15px 0;
    }

    /* Hide table headers on mobile */
    .sp-category-products-table thead {
        display: none;
    }

    /* Convert products table to card layout */
    .sp-category-products-table,
    .sp-category-products-table tbody,
    .sp-category-products-table tr {
        display: block;
        width: 100%;
    }

    .sp-category-products-table tr {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(8, 48, 67, 0.1);
        position: relative;
    }

    .sp-category-products-table tr:hover {
        background: white;
        box-shadow: 0 4px 12px rgba(8, 48, 67, 0.15);
    }

    .sp-category-products-table td {
        display: block;
        width: 100% !important;
        padding: 8px 0;
        border: none;
        text-align: right;
        position: relative;
    }

    /* Add labels before content for products */
    .sp-category-products-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #083043;
        display: block;
        margin-bottom: 5px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Product image styling for mobile */
    .sp-product-image-cell {
        text-align: center;
        margin-bottom: 10px;
    }

    .sp-product-image-cell:before {
        display: none;
    }

    .sp-product-image-wrapper,
    .sp-product-image-placeholder {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    /* Product info styling */
    .sp-product-name-cell {
        margin-bottom: 15px;
    }

    .sp-product-name {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .sp-product-description {
        font-size: 13px;
        line-height: 1.4;
    }

    /* Product price styling */
    .sp-product-price-cell {
        font-size: 18px;
        font-weight: 700;
        color: #083043;
        text-align: center;
        background: #d7e4ea;
        padding: 10px;
        border-radius: 8px;
        margin: 10px 0;
    }

    .sp-product-price-cell:before {
        display: none;
    }

    /* Product actions styling */
    .sp-product-actions-cell {
        text-align: center;
        margin-top: 15px;
    }

    .sp-product-actions-cell:before {
        display: none;
    }

    .sp-view-product-btn,
    .sp-add-to-cart-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
        padding: 12px;
        font-size: 14px;
        text-align: center;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .sp-category-products-container {
        overflow-x: scroll;
    }

    .sp-category-products-table {
        min-width: 500px;
    }
}

/* Mobile Responsive Styles for Product Tables */
@media (max-width: 768px) {

    /* Hide product table headers on mobile */
    .sp-category-products-table thead {
        display: none !important;
    }

    /* Convert products table to card layout */
    .sp-category-products-table,
    .sp-category-products-table tbody,
    .sp-category-products-table tr {
        display: block !important;
        width: 100% !important;
    }

    .sp-category-products-table tr {
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
        padding: 15px !important;
        box-shadow: 0 2px 8px rgba(8, 48, 67, 0.1) !important;
        position: relative !important;
    }

    .sp-category-products-table tr:hover {
        background: white !important;
        box-shadow: 0 4px 12px rgba(8, 48, 67, 0.15) !important;
    }

    .sp-category-products-table td {
        display: block !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border: none !important;
        text-align: right !important;
        position: relative !important;
    }

    /* Add labels before content for products */
    .sp-category-products-table td:before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #083043 !important;
        display: block !important;
        margin-bottom: 5px !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    /* Product image styling for mobile */
    .sp-product-image-cell {
        text-align: center !important;
        margin-bottom: 10px !important;
    }

    .sp-product-image-cell:before {
        display: none !important;
    }

    .sp-product-image-wrapper,
    .sp-product-image-placeholder {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto !important;
    }

    /* Product info styling */
    .sp-product-name-cell {
        margin-bottom: 15px !important;
    }

    .sp-product-name {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    .sp-product-description {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* Product price styling */
    .sp-product-price-cell {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #083043 !important;
        text-align: center !important;
        background: #d7e4ea !important;
        padding: 10px !important;
        border-radius: 8px !important;
        margin: 10px 0 !important;
    }

    .sp-product-price-cell:before {
        display: none !important;
    }

    /* Product actions styling */
    .sp-product-actions-cell {
        text-align: center !important;
        margin-top: 15px !important;
    }

    .sp-product-actions-cell:before {
        display: none !important;
    }

    .sp-view-product-btn,
    .sp-add-to-cart-btn {
        display: block !important;
        width: 100% !important;
        margin: 5px 0 !important;
        padding: 12px !important;
        font-size: 14px !important;
        text-align: center !important;
        border-radius: 8px !important;
    }
}

/* Extra small screens - Product Tables */
@media (max-width: 480px) {
    .sp-category-products-table tr {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }

    .sp-product-name {
        font-size: 15px !important;
    }

    .sp-product-description {
        font-size: 12px !important;
    }

    .sp-product-price-cell {
        font-size: 16px !important;
        padding: 8px !important;
    }

    .sp-view-product-btn,
    .sp-add-to-cart-btn {
        padding: 10px !important;
        font-size: 13px !important;
    }
}

/* Force mobile layout for product tables */
@media screen and (max-width: 768px) {
    .sp-category-products-container {
        overflow: visible !important;
    }

    .sp-category-products-table {
        width: 100% !important;
        table-layout: auto !important;
        border-collapse: separate !important;
    }
}

/* Mobile R
esponsive Styles for Category Tables */
@media (max-width: 768px) {

    /* Hide category table headers on mobile */
    .sp-categories-table thead {
        display: none !important;
    }

    /* Convert categories table to card layout */
    .sp-categories-table,
    .sp-categories-table tbody,
    .sp-categories-table tr {
        display: block !important;
        width: 100% !important;
    }

    .sp-categories-table tr {
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
        padding: 15px !important;
        box-shadow: 0 2px 8px rgba(8, 48, 67, 0.1) !important;
        position: relative !important;
    }

    .sp-categories-table tr:hover {
        background: white !important;
        box-shadow: 0 4px 12px rgba(8, 48, 67, 0.15) !important;
    }

    .sp-categories-table td {
        display: block !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border: none !important;
        text-align: right !important;
        position: relative !important;
    }

    /* Add labels before content for categories */
    .sp-categories-table td:before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #083043 !important;
        display: block !important;
        margin-bottom: 5px !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    /* Category image styling for mobile */
    .sp-category-image-cell {
        text-align: center !important;
        margin-bottom: 10px !important;
    }

    .sp-category-image-cell:before {
        display: none !important;
    }

    .sp-category-image-wrapper {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto !important;
    }

    .sp-category-image-placeholder {
        width: 80px !important;
        height: 80px !important;
        font-size: 11px !important;
    }

    /* Category info styling */
    .sp-category-info-cell {
        margin-bottom: 15px !important;
    }

    .sp-category-name {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .sp-category-hierarchy {
        font-size: 11px !important;
        margin-bottom: 5px !important;
    }

    /* First product styling */
    .sp-first-product-cell .sp-product-mini {
        background: #d7e4ea !important;
        padding: 10px !important;
        border-radius: 8px !important;
    }

    /* Actions styling */
    .sp-category-actions-cell {
        text-align: center !important;
        margin-top: 10px !important;
    }

    .sp-category-actions-cell:before {
        display: none !important;
    }

    .sp-view-all-btn-table {
        display: block !important;
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
        text-align: center !important;
    }
}

/* Force mobile layout for category tables */
@media screen and (max-width: 768px) {
    .sp-categories-container {
        overflow: visible !important;
    }

    .sp-categories-table {
        width: 100% !important;
        table-layout: auto !important;
        border-collapse: separate !important;
    }
}

/* Prevent horizontal scrolling on mobile */
@media (max-width: 768px) {

    .sp-categories-container,
    .sp-category-products-container {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .sp-categories-table,
    .sp-category-products-table {
        min-width: 100% !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Ensure no table elements cause horizontal scroll */
    .sp-categories-table *,
    .sp-category-products-table * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}

/* No products message styling */
.sp-no-products-message {
    text-align: center;
    padding: 40px 20px;
    background: #d7e4ea;
    border-radius: 12px;
    margin: 20px 0;
}

.sp-no-products-message p {
    font-size: 16px;
    color: #083043;
    margin: 0;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sp-no-products-message {
        padding: 30px 15px;
    }

    .sp-no-products-message p {
        font-size: 14px;
    }
}

/* Add to cart form styling */
.sp-add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.sp-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.sp-quantity-label {
    font-size: 12px;
    font-weight: 600;
    color: #083043;
    white-space: nowrap;
}

.sp-quantity-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #083043;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    background: white;
    color: #083043;
    padding-right: 4px; /* Space for spin buttons */
}

.sp-quantity-input:focus {
    outline: none;
    border-color: #0a3a4f;
    box-shadow: 0 0 0 2px rgba(8, 48, 67, 0.1);
}

.sp-add-to-cart-btn {
    background: #083043;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.sp-add-to-cart-btn:hover {
    background: #0a3a4f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 48, 67, 0.3);
}

.sp-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sp-product-unavailable {
    text-align: center;
}

.sp-out-of-stock {
    color: #dc3545;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: 4px;
    display: inline-block;
}

/* Mobile responsive styles for add to cart form */
@media (max-width: 768px) {
    .sp-add-to-cart-form {
        width: 100%;
        gap: 12px;
    }

    .sp-quantity-wrapper {
        justify-content: center;
        width: 100%;
    }

    .sp-quantity-input {
        width: 70px;
        padding: 8px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .sp-add-to-cart-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .sp-quantity-label {
        font-size: 13px;
    }
}

/* Succes
s message styling */
.sp-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Added state for button */
.sp-add-to-cart-btn.added {
    background: #28a745 !important;
    color: white !important;
}

/* Quantity input styling improvements - show native spin buttons */
.sp-quantity-input::-webkit-outer-spin-button,
.sp-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: auto;
    margin: 0;
    height: auto;
    opacity: 1;
}

.sp-quantity-input[type=number] {
    -moz-appearance: number-input;
    /* Firefox */
    appearance: auto;
    /* Standard */
}

/*
 Stock status and product notes */
.sp-stock-status {
    margin-top: 5px;
    text-align: center;
}

.sp-stock-status small {
    color: #dc3545;
    font-size: 11px;
    font-style: italic;
}

.sp-product-note {
    margin-top: 5px;
    text-align: center;
}

.sp-product-note small {
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* Disabled state for quantity input and button */
.sp-quantity-input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.sp-add-to-cart-btn:disabled {
    background: #6c757d !important;
    color: white !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.sp-add-to-cart-btn:disabled:hover {
    background: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Improve view product button styling */
.sp-view-product-btn {
    background: #083043;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.sp-view-product-btn:hover {
    background: #0a3a4f;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 48, 67, 0.3);
}

@media (max-width: 768px) {
    .sp-view-product-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}