:root {
    --cod-public-bg: #f8fafc;
    --cod-card: #ffffff;
    --cod-text: #0f172a;
    --cod-muted: #475569;
    --cod-primary: #1d4ed8;
    --cod-primary-dark: #1e40af;
    --cod-accent: #ea580c;
    --cod-border: #dbe4f0;
    --cod-shadow: 0 20px 48px rgba(15, 23, 42, 0.10);
    --cod-radius-xl: 24px;
    --cod-radius-lg: 18px;
}

body.cod-maroc-frontend {
    background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
    color: var(--cod-text);
}

body.cod-maroc-frontend .product-container,
body.cod-maroc-frontend .cod-maroc-ui,
body.cod-maroc-frontend .archive-page-container,
body.cod-maroc-frontend .taxonomy-page-container,
body.cod-maroc-frontend .content-area {
    color: var(--cod-text);
}

body.cod-maroc-frontend .product-container {
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 56px;
}

body.cod-maroc-frontend .product-image-column,
body.cod-maroc-frontend .product-details-column,
body.cod-maroc-frontend .cod-maroc-ui,
body.cod-maroc-frontend .filters-sidebar,
body.cod-maroc-frontend .product-card,
body.cod-maroc-frontend .cod-cart-summary,
body.cod-maroc-frontend .cod-cart-item,
body.cod-maroc-frontend .cod-payment-box,
body.cod-maroc-frontend .order-tracking-form,
body.cod-maroc-frontend .tracking-result-card {
    background: var(--cod-card);
    border: 1px solid var(--cod-border);
    border-radius: var(--cod-radius-xl);
    box-shadow: var(--cod-shadow);
}

body.cod-maroc-frontend .product-image-column,
body.cod-maroc-frontend .product-details-column,
body.cod-maroc-frontend .cod-maroc-ui,
body.cod-maroc-frontend .filters-sidebar,
body.cod-maroc-frontend .cod-cart-summary,
body.cod-maroc-frontend .order-tracking-form,
body.cod-maroc-frontend .tracking-result-card {
    padding: 24px;
}

body.cod-maroc-frontend .product-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.cod-maroc-frontend .product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

body.cod-maroc-frontend .product-card-image,
body.cod-maroc-frontend .cod-cart-item__media {
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
    border-radius: 18px;
    overflow: hidden;
}

body.cod-maroc-frontend .product-card-image img,
body.cod-maroc-frontend .cod-cart-item__media img,
body.cod-maroc-frontend .product-main-image,
body.cod-maroc-frontend .main-product-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

body.cod-maroc-frontend .product-card-title,
body.cod-maroc-frontend .entry-title,
body.cod-maroc-frontend .product-title,
body.cod-maroc-frontend .cod-maroc-ui h2,
body.cod-maroc-frontend .cod-maroc-ui h3 {
    color: var(--cod-text);
    font-weight: 800;
    letter-spacing: -0.02em;
}

body.cod-maroc-frontend .product-price,
body.cod-maroc-frontend .price-amount,
body.cod-maroc-frontend .cod-summary-line.total strong,
body.cod-maroc-frontend .product-card-price {
    color: var(--cod-primary);
    font-weight: 800;
}

body.cod-maroc-frontend .button,
body.cod-maroc-frontend button,
body.cod-maroc-frontend input[type="submit"],
body.cod-maroc-frontend .cod-primary-button,
body.cod-maroc-frontend .discover-button {
    border-radius: 999px !important;
    border: 0;
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--cod-primary), var(--cod-primary-dark));
    color: #fff;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

body.cod-maroc-frontend .button:hover,
body.cod-maroc-frontend button:hover,
body.cod-maroc-frontend input[type="submit"]:hover,
body.cod-maroc-frontend .cod-primary-button:hover,
body.cod-maroc-frontend .discover-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.02);
}

body.cod-maroc-frontend input[type="text"],
body.cod-maroc-frontend input[type="email"],
body.cod-maroc-frontend input[type="number"],
body.cod-maroc-frontend input[type="tel"],
body.cod-maroc-frontend textarea,
body.cod-maroc-frontend select {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid var(--cod-border);
    background: #fff;
    color: var(--cod-text);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.cod-maroc-frontend textarea {
    min-height: 120px;
    padding-top: 12px;
}

body.cod-maroc-frontend input:focus,
body.cod-maroc-frontend textarea:focus,
body.cod-maroc-frontend select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

body.cod-maroc-frontend .custom-quantity-input,
body.cod-maroc-frontend .cod-cart-qty,
body.cod-maroc-frontend .cod-coupon-row,
body.cod-maroc-frontend .product-action-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

body.cod-maroc-frontend .custom-quantity-input,
body.cod-maroc-frontend .cod-cart-qty {
    border: 1px solid var(--cod-border);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

body.cod-maroc-frontend .custom-quantity-input .quantity-button,
body.cod-maroc-frontend .cod-cart-qty button {
    background: #eff6ff;
    color: var(--cod-primary-dark);
    min-width: 44px;
    box-shadow: none;
}

body.cod-maroc-frontend .product-attributes .value,
body.cod-maroc-frontend .attribute-group .value,
body.cod-maroc-frontend .product-attributes-summary .value,
body.cod-maroc-frontend .product-attribute-option {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--cod-primary-dark);
    border: 1px solid rgba(37, 99, 235, 0.12);
    margin: 0 6px 6px 0;
    font-size: 0.92rem;
    font-weight: 600;
}

body.cod-maroc-frontend .products-grid,
body.cod-maroc-frontend .cod-offer-grid {
    gap: 22px;
}

body.cod-maroc-frontend .cod-checkout-grid,
body.cod-maroc-frontend .cod-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
    gap: 24px;
}

body.cod-maroc-frontend .cod-summary-line,
body.cod-maroc-frontend .cod-payment-option,
body.cod-maroc-frontend .cod-checkbox,
body.cod-maroc-frontend .product-meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

body.cod-maroc-frontend .cod-summary-line {
    padding: 12px 0;
    border-bottom: 1px solid var(--cod-border);
}

body.cod-maroc-frontend .cod-summary-line.total {
    font-size: 1.06rem;
    border-bottom: 0;
}

body.cod-maroc-frontend .cod-cart-item {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    margin-bottom: 16px;
}

body.cod-maroc-frontend .pagination-wrapper,
body.cod-maroc-frontend .woocommerce-pagination {
    margin-top: 30px;
}

body.cod-maroc-frontend .page-numbers {
    border-radius: 999px;
    border: 1px solid var(--cod-border);
    background: #fff;
    color: var(--cod-text);
    padding: 10px 14px;
}

body.cod-maroc-frontend .page-numbers.current,
body.cod-maroc-frontend .page-numbers:hover {
    background: var(--cod-primary);
    color: #fff;
    border-color: var(--cod-primary);
}

body.cod-maroc-frontend .cod-maroc-message.error {
    border-radius: 16px;
    background: rgba(217, 48, 37, 0.08);
    color: #991b1b;
    border: 1px solid rgba(217, 48, 37, 0.18);
}

@media (max-width: 1024px) {
    body.cod-maroc-frontend .cod-checkout-grid,
    body.cod-maroc-frontend .cod-cart-grid,
    body.cod-maroc-frontend .product-container {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    body.cod-maroc-frontend .product-image-column,
    body.cod-maroc-frontend .product-details-column {
        max-width: 100%;
        flex: 1 1 auto;
        position: static;
    }
}

@media (max-width: 640px) {
    body.cod-maroc-frontend .cod-cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    body.cod-maroc-frontend .custom-quantity-input,
    body.cod-maroc-frontend .cod-cart-qty,
    body.cod-maroc-frontend .cod-coupon-row,
    body.cod-maroc-frontend .product-action-wrapper {
        flex-wrap: wrap;
    }
}
