﻿* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial;
    background-color: #f5f7fb;
    overflow-x: hidden;
}

.main-layout {
    min-height: 100vh;
}

.store-header {
    height: 80px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.store-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.store-title {
    font-size: 30px;
    font-weight: bold;
    color: #34c3eb;
}

.whatsapp-button {
    background: #25D366;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.main-content {
    padding: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    transition: 0.2s;
}

    .product-card:hover {
        transform: translateY(-4px);
    }

.product-image-container {
    position: relative;
    height: 320px;
    background: #f3f3f3;
}

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

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff2e63;
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
}

.product-content {
    padding: 20px;
}

.product-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.product-serial {
    color: gray;
    margin-bottom: 15px;
}

.product-price-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.old-price {
    text-decoration: line-through;
    color: gray;
}

.final-price {
    color: #34c3eb;
    font-size: 26px;
    font-weight: bold;
}

.view-product-button {
    width: 100%;
    border: none;
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.home-title {
    margin-bottom: 30px;
    font-size: 40px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-sizing: border-box;
}

.product-modal {
    width: 1000px;
    max-width: 95%;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.modal-product-image {
    width: 100%;
    border-radius: 20px;
    height: 500px;
    object-fit: cover;
}

.modal-serial {
    color: gray;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 35px;
    font-weight: bold;
    color: #34c3eb;
    margin-bottom: 30px;
}

.sizes-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.size-button {
    border: 2px solid #34c3eb;
    background: white;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
}

.selected-size {
    background: #34c3eb;
    color: white;
}

.available-quantity {
    margin-bottom: 20px;
    font-weight: bold;
}

.quantity-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.quantity-button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #34c3eb;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.quantity-value {
    font-size: 22px;
    font-weight: bold;
}

.modal-total {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.cancel-button,
.add-to-cart-button {
    flex: 1;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.cancel-button {
    background: #ddd;
}

.add-to-cart-button {
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
}

.cart-button {
    background: #9b59ff;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
}

.cart-page-title {
    font-size: 40px;
    margin-bottom: 30px;
}

.empty-cart {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

.cart-item-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
}

.cart-item-content {
    flex: 1;
}

.cart-item-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-item-serial,
.cart-item-size {
    color: gray;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 24px;
    font-weight: bold;
    color: #34c3eb;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.cart-quantity-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-total-price {
    font-size: 24px;
    font-weight: bold;
}

.remove-item-button {
    border: none;
    background: red;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.cart-summary {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary-total {
    font-size: 36px;
    font-weight: bold;
}

.checkout-button {
    border: none;
    background: linear-gradient(90deg,#34c3eb,#9b59ff);
    color: white;
    padding: 18px 40px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.continue-shopping-button {
    border: none;
    background: #ddd;
    color: #222;
    padding: 18px 40px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.checkout-modal {
    width: 560px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 24px;
}

    .checkout-modal h2 {
        margin-top: 0;
    }

    .checkout-modal::-webkit-scrollbar {
        width: 8px;
    }

    .checkout-modal::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

    .form-group label {
        font-weight: bold;
        margin-bottom: 8px;
    }

    .form-group input {
        padding: 14px;
        border: 1px solid #ddd;
        border-radius: 12px;
        font-size: 16px;
    }

.checkout-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.checkout-error {
    background: #ffe5e5;
    color: #b00020;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: bold;
}

.delivery-note-box {
    background: #f5f7fb;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.confirmation-check {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
    font-weight: bold;
}

    .confirmation-check input {
        width: 18px;
        height: 18px;
    }

.delivery-price-note {
    font-size: 16px;
    color: #777;
    margin-top: 8px;
    font-weight: normal;
}

.success-modal {
    width: 480px;
    max-width: 95%;
    background: white;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
}

    .success-modal h2 {
        color: #34c3eb;
        margin-top: 0;
    }

    .success-modal p {
        font-size: 18px;
        line-height: 1.8;
    }

.success-message-ar {
    direction: rtl;
    text-align: center;
    unicode-bidi: plaintext;
}

.admin-page-title {
    font-size: 40px;
    margin-bottom: 30px;
}

.admin-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 20px;
}

.admin-order-card {
    background: white;
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    line-height: 1.8;
}

.admin-order-number {
    font-size: 22px;
    font-weight: bold;
    color: #34c3eb;
}

.admin-order-status {
    font-weight: bold;
    color: #9b59ff;
}

.admin-order-modal {
    width: 850px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-order-item {
    display: flex;
    gap: 15px;
    background: #f5f7fb;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.admin-order-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.admin-status-select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.admin-order-dates {
    color: #777;
    font-size: 14px;
}

.admin-login-page {
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-login-card {
    width: 420px;
    max-width: 95%;
    background: white;
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

    .admin-login-card h1 {
        margin-top: 0;
        margin-bottom: 25px;
    }

.logout-button {
    border: none;
    background: #222;
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 25px;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.order-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    line-height: 1.8;
}

.order-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

    .order-header h4 {
        margin: 0;
        color: #34c3eb;
    }

.status-badge {
    background: #f0e7ff;
    color: #6f35d5;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: bold;
    font-size: 14px;
}

.order-modal {
    width: 850px;
    max-width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    border-radius: 25px;
    padding: 30px;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    border: none;
    background: red;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.product-row {
    display: flex;
    gap: 15px;
    background: #f5f7fb;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.admin-order-product-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.size-admin-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

    .size-admin-row input {
        flex: 1;
        padding: 12px;
        border-radius: 10px;
        border: 1px solid #ddd;
    }

.admin-add-product-button {
    margin-bottom: 35px;
    display: inline-block;
}

.admin-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.admin-nav-link {
    text-decoration: none;
    background: #20a7d8;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.2s;
}

    .admin-nav-link:hover {
        background: #168bb5;
        transform: translateY(-1px);
    }

.admin-nav-home {
    background: #222;
}

    .admin-nav-home:hover {
        background: #000;
    }

.admin-top-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin: 18px 0 28px 0;
    flex-wrap: wrap;
}

.admin-action-btn {
    text-decoration: none;
    color: white;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.admin-products {
    background: #6c2ff2;
}

.admin-orders {
    background: #20a7d8;
}

.admin-store {
    background: #16b957;
}

.admin-action-btn:hover {
    opacity: 0.9;
    color: white;
}

.discount-select-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f5f7fb;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.discount-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

    .discount-check-row input {
        width: 18px;
        height: 18px;
    }

.product-discounts-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 14px;
    margin: 16px 0;
}

.product-discounts-title {
    font-weight: 900;
    color: #c2410c;
    margin-bottom: 10px;
}

.product-discount-row {
    color: #7c2d12;
    font-weight: 700;
    margin-bottom: 7px;
}

.discount-summary {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 800;
    margin: 12px 0;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loader-box {
    text-align: center;
}

.page-loader-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    animation: loaderPulse 1s infinite alternate;
}

.page-loader-text {
    margin-top: 10px;
    font-size: 28px;
    font-weight: 900;
    color: #34c3eb;
}

.modal-white-loader {
    min-height: 280px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.small-loader {
    width: 42px;
    height: 42px;
    border: 4px solid #eee;
    border-top: 4px solid #34c3eb;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

.modal-content-hidden {
    display: none;
}

.modal-content-visible {
    display: block;
}

.size-button.out-of-stock-size {
    background: #e5e7eb !important;
    border-color: #cbd5e1 !important;
    color: #8a8a8a !important;
    cursor: not-allowed !important;
    opacity: 0.65;
    text-decoration: line-through;
}

    .size-button.out-of-stock-size:hover {
        transform: none !important;
    }

@keyframes spinLoader {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderPulse {
    from {
        opacity: 0.55;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

.product-card-offers,
.cart-item-offers {
    margin-top: 8px;
    font-size: 13px;
    color: #8a4b00;
    background: #fff7e8;
    border-radius: 10px;
    padding: 8px;
    line-height: 1.5;
}


.admin-product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

    .admin-product-actions .continue-shopping-button,
    .admin-product-actions .remove-item-button {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        font-size: 14px;
        border-radius: 12px;
    }

.modal-product-image,
.cart-item-image {
    object-fit: contain !important;
    background: #f5f5f5;
}


@media (max-width: 600px) {
    .admin-product-actions {
        gap: 6px;
    }

        .admin-product-actions .continue-shopping-button,
        .admin-product-actions .remove-item-button {
            padding: 8px 6px;
            font-size: 12px;
        }

    .store-header {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .store-logo {
        width: 70px;
        height: 70px;
    }

    .store-title {
        font-size: 28px;
    }

    .store-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 10px;
    }

    .cart-button,
    .whatsapp-button {
        flex: 1;
        max-width: 150px;
        text-align: center;
        padding: 9px 10px;
        font-size: 14px;
    }

    .main-content {
        padding: 14px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .product-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .product-image-container {
        height: 105px;
    }

    .product-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 8px;
    }

    .product-image {
        object-fit: cover;
    }

    .product-name {
        font-size: 15px;
        min-height: 34px;
    }

    .final-price {
        font-size: 18px;
    }

    .view-product-button {
        margin-top: auto;
        padding: 8px;
        font-size: 12px;
    }

    .modal-overlay {
        padding: 12px;
        align-items: center;
    }

    .product-modal {
        width: 92vw;
        max-width: 92vw;
        max-height: 78vh;
        padding: 14px;
        overflow-y: auto;
    }

    .modal-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }


    .modal-product-image {
        width: 100%;
        height: 260px !important;
        object-fit: contain !important;
    }

    .modal-serial {
        display: none;
    }

    .modal-price,
    .modal-total {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .sizes-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .modal-buttons {
        gap: 10px;
    }

    .cancel-button,
    .add-to-cart-button {
        padding: 11px;
        font-size: 14px;
    }

    .cart-page-title {
        font-size: 30px;
        margin-bottom: 18px;
    }

    .cart-item-card {
        display: flex;
        flex-direction: column;
        padding: 12px;
        gap: 10px;
    }

    .cart-item-image {
        width: 100% !important;
        height: 220px !important;
        object-fit: contain !important;
    }

    .cart-item-name {
        font-size: 18px;
    }

    .cart-item-serial {
        display: none;
    }

    .cart-item-price,
    .cart-total-price {
        font-size: 20px;
    }

    .cart-item-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .cart-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px;
    }

    .cart-summary-total {
        font-size: 24px;
    }

    .continue-shopping-button,
    .checkout-button {
        padding: 12px;
        font-size: 14px;
    }
}

/* =========================================================
   LaraFashion additions: categories, admin order actions,
   stock, image safety, and responsive fixes
   ========================================================= */

/* Categories filter bars */
.category-filter-bar,
.admin-category-filter-bar,
.product-category-list,
.product-card-categories,
.cart-item-categories,
.modal-product-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.category-filter-bar,
.admin-category-filter-bar {
    margin: 0 0 22px 0;
    padding: 14px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.category-filter-button,
.category-chip,
.product-category-chip {
    border: none;
    border-radius: 999px;
    padding: 9px 15px;
    background: #eef6ff;
    color: #2563eb;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
}

    .category-filter-button.active,
    .category-chip.active {
        background: linear-gradient(90deg,#34c3eb,#9b59ff);
        color: #ffffff;
    }

.product-card-categories,
.cart-item-categories,
.modal-product-categories {
    margin: 8px 0;
}

.product-category-chip {
    padding: 6px 10px;
    font-size: 12px;
    background: #ecfdf5;
    color: #15803d;
}

/* Admin category page */
.category-management-card,
.category-form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    margin-bottom: 18px;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

    .category-row:last-child {
        border-bottom: none;
    }

.category-actions {
    display: flex;
    gap: 8px;
}

/* Order status buttons and delete order */
.order-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px 0;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
}

.order-status-button {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    cursor: pointer;
    background: #e5e7eb;
    color: #374151;
}

    .order-status-button.active-new {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .order-status-button.active-preparing {
        background: #fef3c7;
        color: #92400e;
    }

    .order-status-button.active-ready {
        background: #dcfce7;
        color: #166534;
    }

    .order-status-button.active-shipped {
        background: #e0e7ff;
        color: #3730a3;
    }

    .order-status-button.active-cancelled {
        background: #fee2e2;
        color: #991b1b;
    }

.delete-order-button,
.danger-button {
    border: none;
    border-radius: 12px;
    padding: 11px 16px;
    background: #ef4444;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

    .delete-order-button:disabled,
    .danger-button:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.confirm-delete-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    border-radius: 16px;
    padding: 14px;
    margin-top: 14px;
}

/* Stock / unavailable sizes */
.size-button.out-of-stock-size,
.size-button:disabled {
    background: #e5e7eb !important;
    border-color: #cbd5e1 !important;
    color: #8a8a8a !important;
    cursor: not-allowed !important;
    opacity: 0.65;
    text-decoration: line-through;
}

    .size-button.out-of-stock-size:hover,
    .size-button:disabled:hover {
        transform: none !important;
    }

.stock-out,
.stock-available {
    margin: 10px 0;
    font-weight: 900;
}

.stock-out {
    color: #dc2626;
}

.stock-available {
    color: #16a34a;
}

/* Product images: full image has priority */
.product-image,
.modal-product-image,
.cart-item-image,
.admin-order-item-image {
    object-fit: contain !important;
    background: #f7f7f7;
}

.product-image-container,
.modal-image-box,
.cart-image-box {
    background: #f7f7f7;
}

/* Product and cart cards fixed layout */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.view-product-button,
.admin-product-actions {
    margin-top: auto;
}

.cart-item-card {
    align-items: stretch;
}

.cart-item-offers,
.product-card-offers {
    word-break: normal;
    overflow-wrap: break-word;
}

/* Blazor connection error area - keep it from covering shop badly */
#components-reconnect-modal,
.components-reconnect-modal {
    z-index: 999999 !important;
}

/* Mobile refinements */
@media (max-width: 600px) {
    .category-filter-bar,
    .admin-category-filter-bar {
        padding: 10px;
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .category-filter-button,
    .category-chip {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 13px;
    }

    .product-category-chip {
        font-size: 10px;
        padding: 5px 8px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .product-image-container {
        height: 150px !important;
    }

    .product-name {
        font-size: 15px;
        min-height: 0;
    }

    .product-card-offers {
        min-height: 0;
        font-size: 11px;
        line-height: 1.35;
    }

    .product-modal,
    .checkout-modal {
        width: 92vw;
        max-width: 92vw;
        max-height: 82vh;
        overflow-y: auto;
        padding: 14px;
        border-radius: 22px;
    }

    .modal-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .modal-product-image {
        width: 100% !important;
        height: 240px !important;
        object-fit: contain !important;
    }

    .product-discounts-box,
    .offers-box {
        font-size: 14px;
        line-height: 1.45;
        padding: 12px;
    }

    .sizes-container {
        gap: 8px;
    }

    .size-button {
        padding: 9px 13px;
        min-width: 58px;
    }

    .modal-buttons,
    .checkout-buttons {
        display: flex;
        gap: 10px;
    }

    .cancel-button,
    .add-to-cart-button,
    .checkout-button,
    .continue-shopping-button {
        min-width: 0;
        font-size: 14px;
        padding: 11px 12px;
        border-radius: 14px;
    }

    .cart-item-card {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }

    .cart-item-image {
        width: 100% !important;
        height: 220px !important;
        object-fit: contain !important;
    }

    .cart-item-actions {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        align-items: center;
    }

    .cart-quantity-container {
        justify-content: flex-start;
    }

    .remove-item-button {
        padding: 11px 14px;
        font-size: 14px;
    }

    .cart-summary {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cart-summary-total {
        font-size: 22px;
        line-height: 1.35;
    }

    .order-status-actions {
        padding: 10px;
        gap: 8px;
    }

    .order-status-button {
        padding: 8px 10px;
        font-size: 12px;
    }

    .category-row {
        flex-direction: column;
        align-items: stretch;
    }
}
/* =========================================================
   LaraFashion final modern category/status controls
   ========================================================= */
.lf-filter-panel,
div.lf-filter-panel,
.category-select-bar.lf-filter-panel {
    direction: rtl !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 18px 0 26px 0 !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(52, 195, 235, .22) !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,248,255,.94)) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .10) !important;
    width: fit-content !important;
    max-width: 100% !important;
}

.lf-filter-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 130px !important;
    color: #0f172a !important;
}

.lf-filter-text strong {
    font-size: 18px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
}

.lf-filter-kicker {
    font-size: 12px !important;
    font-weight: 900 !important;
    color: #64748b !important;
}

.lf-select-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    min-width: 235px !important;
}

.lf-select-wrap::after {
    content: "⌄" !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-55%) !important;
    pointer-events: none !important;
    color: #ffffff !important;
    font-size: 24px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

select.lf-modern-select,
.lf-modern-select,
.category-filter-select.lf-modern-select,
.order-status-select.lf-modern-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px !important;
    padding: 0 18px 0 48px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #36c6ed 0%, #7c3aed 100%) !important;
    box-shadow: 0 12px 24px rgba(52, 195, 235, .25), inset 0 1px 0 rgba(255,255,255,.35) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    text-align: right !important;
    line-height: 54px !important;
}

select.lf-modern-select option {
    color: #111827 !important;
    background: #ffffff !important;
    font-weight: 800 !important;
}

select.lf-modern-select:focus {
    box-shadow: 0 0 0 5px rgba(52, 195, 235, .18), 0 12px 24px rgba(52, 195, 235, .25) !important;
}

.lf-order-status-card {
    direction: rtl !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin: 0 0 24px 0 !important;
    padding: 20px !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, #ffffff, #f4fbff) !important;
    border: 1px solid rgba(52, 195, 235, .20) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .12) !important;
}

.lf-order-status-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.lf-order-status-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.lf-order-status-title span {
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.lf-order-status-title strong {
    color: #0f172a !important;
    font-size: 28px !important;
    font-weight: 950 !important;
}

.lf-status-pill {
    border-radius: 999px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

.lf-order-status-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
}

.lf-status-wrap {
    min-width: 250px !important;
}

.lf-save-status-btn,
button.lf-save-status-btn {
    height: 54px !important;
    min-height: 54px !important;
    border: 0 !important;
    border-radius: 18px !important;
    padding: 0 26px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 12px 24px rgba(34, 197, 94, .23), inset 0 1px 0 rgba(255,255,255,.32) !important;
}

.lf-save-status-btn:hover {
    transform: translateY(-1px) !important;
}

.lf-delete-order-btn,
button.lf-delete-order-btn {
    align-self: flex-start !important;
    border: 0 !important;
    border-radius: 18px !important;
    padding: 13px 20px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    font-size: 16px !important;
    font-weight: 950 !important;
    box-shadow: 0 12px 24px rgba(239, 68, 68, .20) !important;
}

.lf-delete-order-hint {
    width: fit-content !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    background: #fff7ed !important;
    color: #9a3412 !important;
    font-weight: 850 !important;
}

@media (max-width: 700px) {
    .lf-filter-panel,
    div.lf-filter-panel,
    .category-select-bar.lf-filter-panel {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
        border-radius: 20px !important;
    }

    .lf-filter-text {
        min-width: 0 !important;
    }

    .lf-select-wrap,
    .lf-status-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    select.lf-modern-select,
    .lf-modern-select {
        height: 48px !important;
        min-height: 48px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
        line-height: 48px !important;
    }

    .lf-order-status-card {
        padding: 14px !important;
        border-radius: 22px !important;
    }

    .lf-order-status-top {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .lf-order-status-title strong {
        font-size: 22px !important;
    }

    .lf-order-status-actions {
        grid-template-columns: 1fr !important;
    }

    .lf-save-status-btn,
    button.lf-save-status-btn,
    .lf-delete-order-btn,
    button.lf-delete-order-btn {
        width: 100% !important;
        height: 48px !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }
}

/* =========================================================
   LaraFashion modern category/status controls
   Appended directly into site.css to avoid missing CSS links/cache issues.
   ========================================================= */
:root {
    --lf-blue: #36c6ed;
    --lf-purple: #7c3aed;
    --lf-green: #22c55e;
    --lf-dark: #0f172a;
    --lf-muted: #64748b;
}

.lf-filter-panel,
div.lf-filter-panel,
.store-category-filter,
.admin-category-select-bar {
    direction: rtl !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    margin: 18px 0 26px 0 !important;
    padding: 14px 16px !important;
    width: fit-content !important;
    max-width: 100% !important;
    border: 1px solid rgba(52, 195, 235, .24) !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,248,255,.96)) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .10) !important;
}

.lf-filter-panel .lf-filter-text,
.store-category-filter .lf-filter-text,
.admin-category-select-bar .lf-filter-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 140px !important;
    color: var(--lf-dark) !important;
    text-align: right !important;
}

.lf-filter-panel .lf-filter-kicker,
.store-category-filter .lf-filter-kicker,
.admin-category-select-bar .lf-filter-kicker {
    display: block !important;
    color: var(--lf-muted) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
}

.lf-filter-panel .lf-filter-text strong,
.store-category-filter .lf-filter-text strong,
.admin-category-select-bar .lf-filter-text strong {
    color: var(--lf-dark) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.lf-filter-panel .lf-select-wrap,
.store-category-filter .lf-select-wrap,
.admin-category-select-bar .lf-select-wrap,
.lf-status-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    min-width: 235px !important;
}

.lf-filter-panel .lf-select-wrap::after,
.store-category-filter .lf-select-wrap::after,
.admin-category-select-bar .lf-select-wrap::after,
.lf-status-wrap::after {
    content: "⌄" !important;
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-56%) !important;
    pointer-events: none !important;
    color: #ffffff !important;
    font-size: 24px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    z-index: 2 !important;
}

select.lf-modern-select,
.lf-modern-select,
.lf-filter-panel select,
.store-category-filter select,
.admin-category-select-bar select,
select.order-status-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px !important;
    padding: 0 18px 0 50px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--lf-blue) 0%, var(--lf-purple) 100%) !important;
    box-shadow: 0 12px 24px rgba(52, 195, 235, .25), inset 0 1px 0 rgba(255,255,255,.35) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    text-align: right !important;
    line-height: 54px !important;
}

select.lf-modern-select option,
.lf-filter-panel select option,
.store-category-filter select option,
.admin-category-select-bar select option,
select.order-status-select option {
    color: #111827 !important;
    background: #ffffff !important;
    font-weight: 800 !important;
}

select.lf-modern-select:focus,
.lf-filter-panel select:focus,
.store-category-filter select:focus,
.admin-category-select-bar select:focus,
select.order-status-select:focus {
    box-shadow: 0 0 0 5px rgba(52, 195, 235, .18), 0 12px 24px rgba(52, 195, 235, .25) !important;
}

.lf-order-status-card,
div.lf-order-status-card {
    direction: rtl !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin: 0 0 24px 0 !important;
    padding: 20px !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, #ffffff, #f4fbff) !important;
    border: 1px solid rgba(52, 195, 235, .22) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .12) !important;
}

.lf-order-status-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.lf-order-status-title {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: right !important;
}

.lf-order-status-title span {
    color: var(--lf-muted) !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

.lf-order-status-title strong {
    color: var(--lf-dark) !important;
    font-size: 28px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.lf-status-pill,
.status-badge.lf-status-pill {
    border-radius: 999px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

.lf-order-status-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
}

.lf-save-status-btn,
button.lf-save-status-btn {
    height: 54px !important;
    min-height: 54px !important;
    border: 0 !important;
    border-radius: 18px !important;
    padding: 0 26px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--lf-green), #16a34a) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 12px 24px rgba(34, 197, 94, .23), inset 0 1px 0 rgba(255,255,255,.32) !important;
}

.lf-delete-order-btn,
button.lf-delete-order-btn {
    align-self: flex-start !important;
    border: 0 !important;
    border-radius: 18px !important;
    padding: 13px 20px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    font-size: 16px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
    box-shadow: 0 12px 24px rgba(239, 68, 68, .20) !important;
}

.lf-delete-order-hint {
    width: fit-content !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    background: #fff7ed !important;
    color: #9a3412 !important;
    font-weight: 850 !important;
}

@media (max-width: 700px) {
    .lf-filter-panel,
    div.lf-filter-panel,
    .store-category-filter,
    .admin-category-select-bar {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
        border-radius: 20px !important;
    }

    .lf-filter-panel .lf-filter-text,
    .store-category-filter .lf-filter-text,
    .admin-category-select-bar .lf-filter-text {
        min-width: 0 !important;
    }

    .lf-filter-panel .lf-select-wrap,
    .store-category-filter .lf-select-wrap,
    .admin-category-select-bar .lf-select-wrap,
    .lf-status-wrap {
        width: 100% !important;
        min-width: 0 !important;
    }

    select.lf-modern-select,
    .lf-modern-select,
    .lf-filter-panel select,
    .store-category-filter select,
    .admin-category-select-bar select,
    select.order-status-select {
        height: 48px !important;
        min-height: 48px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
        line-height: 48px !important;
    }

    .lf-order-status-card {
        padding: 14px !important;
        border-radius: 22px !important;
    }

    .lf-order-status-top,
    .lf-order-status-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .lf-order-status-title strong {
        font-size: 22px !important;
    }

    .lf-save-status-btn,
    button.lf-save-status-btn,
    .lf-delete-order-btn,
    button.lf-delete-order-btn {
        width: 100% !important;
        height: 48px !important;
        min-height: 48px !important;
        font-size: 16px !important;
    }
}
