/* WooCommerce Custom Styles - Minimalist Book Card Design */

:root {
    --du-primary: #111827;
    --du-accent: #000000;
    --du-bg: #ffffff;
    --du-border: #e0e0e0;
    --du-text: #1a1a1a;
    --du-text-light: #6b7280;
    --radius-lg: 0px;
    --radius-md: 0px;
    --shadow-soft: none;
    --transition: transform 0.3s ease;
}

.duwaale-main-content {
    background: #fff;
    min-height: 100vh;
}

/* ===========================
   Product Grid Layout
   =========================== */
.products-grid,
ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
}

@media (min-width: 768px) {

    .products-grid,
    ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1024px) {

    .products-grid,
    ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {

    .products-grid,
    ul.products {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ===========================
   Minimalist Book Card
   =========================== */
.book-card,
li.product {
    width: 100% !important;
    max-width: 240px !important;
    background: #fff;
    border: 1px solid var(--du-border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: none;
    margin: 0 auto !important;
    float: none !important;
}

.book-card:hover,
li.product:hover {
    border-color: #c0c0c0;
}


/* Image Area */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: #f5f5f5;
}

.book-cover,
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Sale Badge */
.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--du-accent);
    color: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Add to Cart Overlay - Slides up on hover */
.add-cart-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--du-accent);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(100%);
    transition: var(--transition);
    text-decoration: none;
    z-index: 5;
}

.book-card:hover .add-cart-overlay {
    transform: translateY(0);
}

.add-cart-overlay:hover {
    background: #1a1a1a;
}

/* Out of Stock Overlay */
.out-of-stock-overlay {
    background: #6b7280 !important;
    cursor: not-allowed;
}

/* Cart Icon placeholder removed to resolve linting */

/* Loading State */
.add-cart-overlay.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add-cart-overlay.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Details Section */
.details {
    padding: 12px;
    text-align: left;
}

.title {
    margin: 0;
    font-size: 0.95rem;
    color: var(--du-text);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.price {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--du-text);
}

.price del {
    color: var(--du-text-light);
    font-size: 0.85em;
    opacity: 0.7;
    margin-right: 4px;
}

.price ins {
    text-decoration: none;
}

/* ===========================
   Single Product Layout 
   =========================== */
.single-product-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .single-product-wrapper {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 64px;
        align-items: start;
    }
}

/* ===========================
   Product Image Slider
   =========================== */
.product-gallery-section {
    position: relative;
    border: 1px solid var(--du-border);
    overflow: hidden;
    max-height: 600px;
    width: 100%;
}

.product-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-main {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
    width: 100%;
}

.slider-item {
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.product-main-image {
    width: 100%;
    height: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dots .dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.slider-prev:hover,
.slider-next:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}

/* Info - Right Column */
.product-info-sticky {
    position: sticky;
    top: 100px;
}

.product_title {
    font-family: 'DM Sans', sans-serif;
    /* Minimal font */
    font-size: 28px;
    font-weight: 700;
    color: var(--du-primary);
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Price with Discount */
.product-price-section {
    margin-bottom: 24px;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: 'DM Sans', sans-serif;
    /* Minimal font */
}

.sale-price,
.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--du-primary);
}

.regular-price {
    font-size: 20px;
    color: var(--du-text-light);
}

.discount-badge {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* Short Description (About the Product) */
.product-short-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--du-text);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--du-border);
}

.description-content {
    position: relative;
    transition: all 0.3s ease;
}

.description-content.collapsed {
    max-height: 120px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.read-more-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--du-primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.read-more-btn:hover {
    color: var(--du-accent);
}

.product-short-description p {
    margin-bottom: 12px;
}

/* Cart Form (Quantity + Button) */
.product-info-section .cart {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
}

.product-info-section .quantity {
    display: flex;
    align-items: center;
}

.product-info-section .quantity .qty {
    width: 60px;
    height: 48px;
    border: 1px solid var(--du-border);
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--du-primary);
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.product-info-section .quantity .qty::-webkit-outer-spin-button,
.product-info-section .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-info-section .single_add_to_cart_button {
    flex: 1;
    background: var(--du-primary);
    color: white;
    border: none;
    border-radius: 8px;
    height: 48px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info-section .single_add_to_cart_button:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Disabled button state */
.product-info-section .single_add_to_cart_button.disabled {
    background: var(--du-text-light);
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Trust Badges */
.trust-badges-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--du-border);
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
}

.trust-badge-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.trust-badge-item svg {
    flex-shrink: 0;
    color: #10b981;
    margin-top: 2px;
}

.trust-badge-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--du-primary);
    margin-bottom: 2px;
}

.trust-badge-item p {
    font-size: 13px;
    color: var(--du-text-light);
    margin: 0;
}

/* Product Description Section */
.product-description-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
    border-top: 1px solid var(--du-border);
}

.product-description-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--du-primary);
}

.description-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--du-text);
}

.description-content p {
    margin-bottom: 16px;
}

.description-content ul,
.description-content ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

/* People Also Buy Section */
.related-products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
    border-top: 1px solid var(--du-border);
}

.related-products-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--du-primary);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (min-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Explore Categories Section */
.explore-categories-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    border-top: 1px solid var(--du-border);
}

.explore-categories-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--du-primary);
}

.explore-categories-section .category-nav {
    padding: 20px 0;
    padding-left: 0;
    padding-right: 0;
}

.explore-categories-section .category-list {
    padding-left: 0;
    gap: 16px;
}

.explore-categories-section .category-item {
    min-width: 180px;
    padding: 16px 24px;
    border-radius: 16px;
}

.explore-categories-section .category-icon {
    width: 36px;
    height: 36px;
}

.explore-categories-section .category-icon svg {
    width: 20px;
    height: 20px;
}

.explore-categories-section .category-label {
    font-size: 16px;
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .single-product-wrapper {
        padding: 20px 16px 0;
    }

    .product_title {
        font-size: 22px;
    }

    .sale-price,
    .current-price {
        font-size: 26px;
    }

    .slider-prev,
    .slider-next {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .product-description-section,
    .related-products-section,
    .explore-categories-section {
        padding: 32px 16px;
    }
}

/* Remove old styles */


/* ===========================
   Archive Header
   =========================== */
.archive-header-wrapper {
    background: var(--du-bg);
    border-bottom: 1px solid var(--du-border);
}

.archive-header {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.archive-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* ===========================
   Breadcrumbs - Overlay on Shop Header
   =========================== */
.woocommerce-breadcrumb {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 20;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.woocommerce-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.woocommerce-breadcrumb a:hover {
    color: #ffffff;
}

/* Separator styling - add > between items */
.woocommerce-breadcrumb a::after {
    content: ' > ';
    color: rgba(255, 255, 255, 0.6);
    margin: 0 6px;
}

/* Last breadcrumb (current page) - primary color */
.woocommerce-breadcrumb a:last-child::after {
    content: none;
    /* Remove separator after last item */
}

/* Breadcrumb items */
.breadcrumb-item {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Breadcrumb item links */
.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #ffffff;
}

/* Separator styling */
.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 6px;
}

/* Current page (last breadcrumb item without link) */
.breadcrumb-item:last-child {
    color: #ffffff;
    font-weight: 600;
}

/* Make shop header relative for breadcrumb positioning */
.shop-header {
    position: relative;
}

/* Responsive breadcrumbs */
@media (max-width: 767px) {
    .woocommerce-breadcrumb {
        font-size: 12px;
        top: 12px;
        left: 12px;
    }

    .woocommerce-breadcrumb a::after {
        margin: 0 4px;
    }
}

/* ===========================
   Product Page Breadcrumbs - Black Text
   =========================== */
.single-product .woocommerce-breadcrumb {
    position: sticky;
    top: 54px;
    /* Height of header */
    margin-bottom: 0;
    padding: 4px 20px;
    color: var(--du-text);
    border-bottom: 1px solid var(--du-border);
    background-color: #ffffff;
    z-index: 999;
}

.single-product .woocommerce-breadcrumb a {
    color: var(--du-text-light);
}

.single-product .woocommerce-breadcrumb a:hover {
    color: var(--du-primary);
}

.single-product .woocommerce-breadcrumb a::after {
    color: var(--du-text-light);
}

.single-product .breadcrumb-item {
    color: var(--du-text-light);
}

.single-product .breadcrumb-item a {
    color: var(--du-text-light);
}

.single-product .breadcrumb-item a:hover {
    color: var(--du-primary);
}

.single-product .breadcrumb-separator {
    color: var(--du-text-light);
}

.single-product .breadcrumb-item:last-child {
    color: var(--du-primary);
    font-weight: 600;
}


/* ===========================
   Category Selector Pills
   =========================== */
.category-selector-scroll,
.subcategory-selector-scroll {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.category-selector-scroll::-webkit-scrollbar,
.subcategory-selector-scroll::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.category-pill {
    padding: 10px 20px;
    background: #f3f4f6;
    border-radius: 24px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.category-pill:hover {
    background: #e5e7eb;
    color: #111827;
    transform: translateY(-1px);
}

.category-pill.active {
    background: #111827;
    color: #ffffff;
    font-weight: 600;
}

/* Mobile adjustments for category selector */
@media (max-width: 767px) {

    .category-selector-section h3,
    .subcategory-selector-section h3 {
        font-size: 16px !important;
    }

    .category-pill {
        padding: 8px 16px;
        font-size: 13px;
    }
}


/* ===========================
   Pagination
   =========================== */
.woocommerce-pagination {
    margin-top: 48px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    border: none;
}

.woocommerce-pagination ul li {
    border: none;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--du-border);
    color: var(--du-text);
    text-decoration: none;
    transition: all 0.2s;
}

.woocommerce-pagination ul li a:hover {
    border-color: var(--du-primary);
    background: #f5f5f5;
}

.woocommerce-pagination ul li span.current {
    background: var(--du-primary);
    color: white;
    border-color: var(--du-primary);
}

/* ===========================
   Result Count & Ordering - Hidden
   =========================== */
.woocommerce-result-count,
.woocommerce-ordering {
    display: none !important;
}


/* ===========================
   Messages & Notices
   =========================== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #D1FAE5;
    border-color: #10B981;
    color: #065F46;
}

.woocommerce-info {
    background: #DBEAFE;
    border-color: #3B82F6;
    color: #1E40AF;
}

.woocommerce-error {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

/* ===========================
   Mobile Optimizations
   =========================== */
@media (max-width: 767px) {
    .single-product-wrapper {
        padding: 20px 16px;
    }

    .product_title {
        font-size: 24px;
    }

    .woocommerce-tabs {
        margin-top: 48px;
        padding-top: 40px;
    }

    .related h2 {
        font-size: 20px;
    }

    /* .image-wrapper {
        height: 280px;
    } removed as per request */
}

/* ===========================
   Utility Classes
   =========================== */
.duwaale-main-content {
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ensure images are responsive */
.woocommerce img {
    max-width: 100%;
    height: 100%;
}

/* Stock Status */
.stock {
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

.stock.in-stock {
    color: #10B981;
}

.stock.out-of-stock {
    color: #EF4444;
}

/* ===========================
   Floating Cart Button
   =========================== */
.floating-cart-btn {
    position: fixed;
    bottom: 80px;
    /* Above bottom nav on mobile */
    right: 20px;
    background: #fff;
    color: #000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transition: transform 0.2s;
    text-decoration: none;
}

.floating-cart-btn:hover {
    transform: scale(1.05);
    background: #fff;
}



/* Badge Styling - Mimicking the Plus Icon placement */
.floating-cart-btn .cart-count {
    position: absolute;
    bottom: 15px;
    right: 15px;
    /* Offset to match the 'plus' position inside the 60px circle */
    background: white;
    color: black;
    font-size: 11px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 2px solid #000;
    transform: translate(30%, 30%);
}

@media (min-width: 768px) {
    .floating-cart-btn {
        bottom: 40px;
        /* Standard positioning on desktop */
    }
}

/* ===========================
   Social Interaction Buttons (Feed)
   =========================== */
.save-btn,
.share-btn {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.save-btn svg,
.share-btn svg {
    line-height: 1;
    display: block;
}