/*
Theme Name: Dr Noor Child
Theme URI: https://drnoorkw.shop
Description: Dr Noor Store - 1:1 pixel-perfect Arabic/RTL reproduction of drnoor.shop (Shopify Sense theme)
Author: Dr Noor
Template: storefront
Version: 3.0.0
Text Domain: drnoor-child
*/

/* ============================================================
   DESIGN TOKENS - Exact match from original Shopify Sense theme
   ============================================================ */
:root {
    /* Colors (RGB for alpha) - EXACT from original */
    --color-background: 237, 210, 177;
    --gradient-background: linear-gradient(180deg, rgba(237, 210, 177, 1) 100%, rgba(236, 234, 234, 1) 100%);
    --color-foreground: 114, 74, 38;
    --color-background-contrast: 213, 150, 73;
    --color-shadow: 114, 74, 38;
    --color-button: 114, 74, 38;
    --color-button-text: 244, 244, 244;
    --color-secondary-button: 237, 210, 177;
    --color-secondary-button-text: 114, 74, 38;
    --color-link: 114, 74, 38;
    --color-badge-foreground: 114, 74, 38;
    --color-badge-background: 237, 210, 177;

    /* Fonts - EXACT from original */
    --font-body-family: Cairo, sans-serif;
    --font-body-style: normal;
    --font-body-weight: 400;
    --font-body-weight-bold: 700;
    --font-heading-family: "Shippori Mincho", serif;
    --font-heading-style: normal;
    --font-heading-weight: 400;
    --font-body-scale: 1.0;
    --font-heading-scale: 1.05;

    /* Layout */
    --page-width: 120rem;
    --page-width-margin: 0rem;
    --media-radius: 12px;
    --product-card-corner-radius: 1.2rem;
    --product-card-text-alignment: center;
    --product-card-shadow-opacity: 0.35;
    --product-card-shadow-horizontal-offset: 1.0rem;
    --product-card-shadow-vertical-offset: 1.0rem;
    --product-card-shadow-blur-radius: 3.5rem;
    --collection-card-corner-radius: 0.8rem;
    --collection-card-text-alignment: center;
    --collection-card-shadow-opacity: 0.45;
    --collection-card-shadow-horizontal-offset: -2.8rem;
    --collection-card-shadow-vertical-offset: -1.4rem;
    --collection-card-shadow-blur-radius: 4.0rem;
    --badge-corner-radius: 2.0rem;
    --popup-border-width: 1px;
    --popup-border-opacity: 0.1;
    --popup-corner-radius: 22px;

    /* Transitions */
    --dr-transition: all 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body-family) !important;
    font-weight: var(--font-body-weight);
    color: rgb(var(--color-foreground)) !important;
    background-color: rgb(var(--color-background)) !important;
    background: var(--gradient-background) !important;
    line-height: 1.7 !important;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-align: right;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading-family) !important;
    font-weight: var(--font-heading-weight) !important;
    color: rgb(var(--color-foreground)) !important;
    line-height: 1.3 !important;
}

a {
    color: rgb(var(--color-link)) !important;
    text-decoration: none !important;
    transition: var(--dr-transition);
}

a:hover {
    opacity: 0.75;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   HIDE STOREFRONT DEFAULTS
   ============================================================ */
.site-header,
.main-navigation,
#masthead,
.site-branding,
.site-content .col-full,
.woocommerce-breadcrumb,
.storefront-handheld-footer-bar,
.site-footer .col-full,
.hentry .entry-header,
.hentry .entry-content,
.hentry .entry-summary,
.page-title,
.woocommerce-products-header,
.woocommerce-result-count,
.woocommerce-ordering,
.site-info,
.handheld-navigation,
.storefront-product-pagination,
button.menu-toggle,
a.cart-contents,
a.my-account,
.site-search,
#site-navigation,
div#content,
div#primary,
main#main,
header#masthead,
footer#colophon,
nav.navigation.post-navigation,
.page .entry-title,
.home .entry-title,
.storefront-sorting,
#commentform,
.comments-area,
.single-product .entry-summary,
.single-product div.product,
.wp-block-page-list,
ul.menu,
.woocommerce-loop-product__title,
.price,
.add_to_cart_button,
.woocommerce-loop-product__link,
.storefront-sorting,
.woocommerce-pagination,
.woocommerce-result-count,
.woocommerce-ordering,
.related.products,
.upsells.products,
.storefront-product-section,
.site-header-cart,
.storefront-primary-navigation {
    display: none !important;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.drnoor-wrapper {
    max-width: var(--page-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.drnoor-announcement {
    background-color: rgb(var(--color-foreground));
    color: rgb(var(--color-button-text));
    text-align: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-body-family);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ============================================================
   HEADER
   ============================================================ */
.drnoor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 0;
    gap: 2rem;
}

.drnoor-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.drnoor-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: rgb(var(--color-foreground));
    font-size: 1.3rem;
    line-height: 1;
}

.drnoor-logo {
    display: flex;
    align-items: center;
}

.drnoor-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.drnoor-logo-text {
    font-family: var(--font-heading-family);
    font-size: 1.6rem;
    font-weight: 400;
    color: rgb(var(--color-foreground));
    text-decoration: none;
}

/* Navigation */
.drnoor-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.drnoor-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    flex-direction: row-reverse;
}

.drnoor-nav ul li a {
    display: block;
    padding: 0.5rem 1rem;
    font-family: var(--font-body-family);
    font-size: 0.82rem;
    font-weight: 500;
    color: rgb(var(--color-foreground)) !important;
    text-decoration: none;
    transition: var(--dr-transition);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.drnoor-nav ul li a:hover {
    opacity: 0.7;
}

.drnoor-header-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-direction: row-reverse;
}

.drnoor-lang-btn,
.drnoor-login-link,
.drnoor-cart-link {
    font-family: var(--font-body-family);
    font-size: 0.82rem;
    font-weight: 500;
    color: rgb(var(--color-foreground)) !important;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem 0.3rem;
    transition: var(--dr-transition);
    text-decoration: none;
}

.drnoor-lang-btn:hover,
.drnoor-login-link:hover,
.drnoor-cart-link:hover {
    opacity: 0.7;
}

/* Mobile menu toggle */
.drnoor-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: rgb(var(--color-foreground));
    font-size: 1.5rem;
    line-height: 1;
}

/* ============================================================
   SECTION: HEADING
   ============================================================ */
.drnoor-section-heading {
    text-align: center;
    padding: 2rem 0;
}

.drnoor-section-heading h3 {
    font-family: var(--font-heading-family) !important;
    font-size: 2rem;
    font-weight: 400;
    color: rgb(var(--color-foreground));
}

/* ============================================================
   SECTION: SLIDESHOW / BANNER
   ============================================================ */
.drnoor-slideshow {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.drnoor-slideshow-slide {
    width: 100%;
    position: relative;
}

.drnoor-slideshow-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.drnoor-slideshow-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
}

/* ============================================================
   SECTION: COLLECTION LIST (6 categories)
   ============================================================ */
.drnoor-collections {
    padding: 5rem 0;
}

.drnoor-collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.drnoor-collection-card {
    position: relative;
    border-radius: var(--collection-card-corner-radius);
    overflow: hidden;
    box-shadow: var(--collection-card-shadow-horizontal-offset) var(--collection-card-shadow-vertical-offset) var(--collection-card-shadow-blur-radius) rgba(var(--color-shadow), var(--collection-card-shadow-opacity));
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: var(--dr-transition);
}

.drnoor-collection-card:hover {
    transform: scale(1.02);
}

.drnoor-collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.drnoor-collection-card .drnoor-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(transparent, rgba(var(--color-foreground), 0.7));
    text-align: center;
}

.drnoor-collection-card h3 {
    font-family: var(--font-body-family) !important;
    font-size: 1rem;
    font-weight: 700;
    color: rgb(var(--color-button-text)) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.drnoor-collection-card a {
    text-decoration: none;
}

/* ============================================================
   SECTION: FEATURED PRODUCTS
   ============================================================ */
.drnoor-featured-products {
    padding: 5rem 0;
}

.drnoor-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.drnoor-product-card {
    border-radius: var(--product-card-corner-radius);
    overflow: hidden;
    box-shadow: var(--product-card-shadow-horizontal-offset) var(--product-card-shadow-vertical-offset) var(--product-card-shadow-blur-radius) rgba(var(--color-shadow), var(--product-card-shadow-opacity));
    background: #fff;
    transition: var(--dr-transition);
}

.drnoor-product-card:hover {
    transform: translateY(-4px);
}

.drnoor-product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.drnoor-product-card .drnoor-card-info {
    padding: 1.2rem;
    text-align: center;
}

.drnoor-product-card h4 {
    font-family: var(--font-body-family) !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgb(var(--color-foreground)) !important;
    padding: 0.5rem 0;
}

.drnoor-product-card .drnoor-price {
    font-family: var(--font-body-family);
    font-size: 0.88rem;
    font-weight: 600;
    color: rgb(var(--color-foreground));
}

.drnoor-product-card .drnoor-btn {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.6rem 1.5rem;
    background: rgb(var(--color-button));
    color: rgb(var(--color-button-text)) !important;
    border: none;
    border-radius: 30px;
    font-family: var(--font-body-family);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--dr-transition);
}

.drnoor-product-card .drnoor-btn:hover {
    opacity: 0.85;
}

/* ============================================================
   SECTION: REVIEWS / TESTIMONIALS
   ============================================================ */
.drnoor-reviews {
    padding: 5rem 0;
    background: transparent;
}

.drnoor-reviews-header {
    text-align: center;
    margin-bottom: 3rem;
}

.drnoor-reviews-header h2 {
    font-family: var(--font-heading-family) !important;
    font-size: 1.8rem;
    font-weight: 400;
    color: rgb(var(--color-foreground));
}

.drnoor-reviews-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    scrollbar-width: none;
    direction: ltr; /* Keep slider LTR for proper scrolling */
}

.drnoor-reviews-slider::-webkit-scrollbar {
    display: none;
}

.drnoor-review-card {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 280px;
    scroll-snap-align: start;
    background: rgb(var(--color-button-text));
    border-radius: var(--popup-corner-radius);
    padding: 1.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    direction: rtl; /* Restore RTL for card content */
}

.drnoor-review-card p {
    font-family: var(--font-body-family);
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgb(var(--color-foreground));
}

.drnoor-review-card .drnoor-review-emoji {
    font-size: 1.2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.drnoor-footer {
    background-color: rgb(var(--color-foreground));
    color: rgb(var(--color-button-text));
    padding: 4rem 0 0;
}

.drnoor-footer .drnoor-wrapper {
    max-width: var(--page-width);
}

.drnoor-footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    padding-bottom: 3rem;
}

.drnoor-footer-info h2 {
    font-family: var(--font-body-family) !important;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgb(var(--color-button-text)) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.drnoor-footer-info p {
    font-size: 0.8rem;
    color: rgba(244, 244, 244, 0.85);
    line-height: 1.8;
    margin-bottom: 0.3rem;
}

.drnoor-footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.drnoor-footer-newsletter h2 {
    font-family: var(--font-body-family) !important;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgb(var(--color-button-text)) !important;
    text-align: right;
}

.drnoor-newsletter-form {
    display: flex;
    width: 100%;
    max-width: 350px;
    flex-direction: row-reverse;
}

.drnoor-newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 0 var(--popup-corner-radius) var(--popup-corner-radius) 0;
    font-family: var(--font-body-family);
    font-size: 0.85rem;
    outline: none;
    background: rgba(255,255,255,0.15);
    color: rgb(var(--color-button-text));
    text-align: right;
}

.drnoor-newsletter-form input[type="email"]::placeholder {
    color: rgba(244,244,244,0.6);
}

.drnoor-newsletter-form button {
    padding: 12px 28px;
    background: rgb(var(--color-background));
    color: rgb(var(--color-foreground));
    border: none;
    border-radius: var(--popup-corner-radius) 0 0 var(--popup-corner-radius);
    font-family: var(--font-body-family);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--dr-transition);
}

.drnoor-newsletter-form button:hover {
    opacity: 0.85;
}

.drnoor-footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-direction: row-reverse;
}

.drnoor-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: rgb(var(--color-button-text)) !important;
    font-size: 0.9rem;
    transition: var(--dr-transition);
}

.drnoor-footer-social a:hover {
    background: rgba(255,255,255,0.25);
    opacity: 1;
}

/* Footer bottom */
.drnoor-footer-bottom {
    border-top: 1px solid rgba(244,244,244,0.1);
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

.drnoor-footer-payments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row-reverse;
}

.drnoor-footer-payments img {
    height: 24px;
    width: auto;
    opacity: 0.7;
}

.drnoor-footer-payments-label {
    font-size: 0.72rem;
    color: rgba(244,244,244,0.6);
    margin-left: 0.3rem;
}

.drnoor-footer-copyright {
    font-size: 0.75rem;
    color: rgba(244,244,244,0.6);
}

.drnoor-footer-copyright a {
    color: rgba(244,244,244,0.7) !important;
}

.drnoor-footer-links {
    display: flex;
    gap: 0.8rem;
    font-size: 0.75rem;
    flex-direction: row-reverse;
}

.drnoor-footer-links a {
    color: rgba(244,244,244,0.6) !important;
}

.drnoor-footer-links a::after {
    content: '·';
    margin-right: 0.8rem;
    color: rgba(244,244,244,0.4);
}

.drnoor-footer-links a:first-child::after {
    display: none;
}

/* ============================================================
   RESPONSIVE: Tablet (max-width: 990px)
   ============================================================ */
@media screen and (max-width: 990px) {
    .drnoor-nav {
        display: none;
    }

    .drnoor-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgb(var(--color-background));
        padding: 1rem 2rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .drnoor-nav.active ul {
        flex-direction: column;
        align-items: flex-end;
    }

    .drnoor-menu-toggle {
        display: block;
    }

    .drnoor-collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .drnoor-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .drnoor-footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .drnoor-footer-newsletter {
        align-items: flex-start;
    }

    .drnoor-footer-newsletter h2 {
        text-align: left;
    }
}

/* ============================================================
   RESPONSIVE: Mobile (max-width: 749px)
   ============================================================ */
@media screen and (max-width: 749px) {
    :root {
        --section-padding: 3rem;
    }

    .drnoor-wrapper {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .drnoor-header {
        padding: 0.8rem 0;
    }

    .drnoor-logo img {
        height: 44px;
    }

    .drnoor-logo-text {
        font-size: 1.2rem;
    }

    .drnoor-announcement {
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }

    .drnoor-section-heading h3 {
        font-size: 1.5rem;
    }

    .drnoor-collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .drnoor-collection-card {
        border-radius: 6px;
    }

    .drnoor-collection-card h3 {
        font-size: 0.78rem;
    }

    .drnoor-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .drnoor-reviews-header h2 {
        font-size: 1.4rem;
    }

    .drnoor-review-card {
        flex: 0 0 calc(85% - 1rem);
        min-width: 260px;
        padding: 1.3rem;
    }

    .drnoor-footer {
        padding: 3rem 0 0;
    }

    .drnoor-footer-info p {
        font-size: 0.75rem;
    }

    .drnoor-newsletter-form {
        max-width: 100%;
    }

    .drnoor-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .drnoor-footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .drnoor-footer-payments img {
        height: 20px;
    }
}

/* ============================================================
   RESPONSIVE: Small mobile (max-width: 480px)
   ============================================================ */
@media screen and (max-width: 480px) {
    .drnoor-collections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .drnoor-collection-card {
        aspect-ratio: 16/9;
    }

    .drnoor-products-grid {
        grid-template-columns: 1fr;
    }

    .drnoor-header-right {
        gap: 0.6rem;
    }

    .drnoor-lang-btn,
    .drnoor-login-link,
    .drnoor-cart-link {
        font-size: 0.75rem;
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
