/* responsive.css - Mobile Fixes for Oorza Jewels */

/* Announcement Bar Fix - Absolute Force Scrolling on Mobile */
@media (max-width: 768px) {
    .top-bar {
        padding: 5px 0 !important;
        overflow: hidden !important;
        position: relative;
    }

    .announcement-slider {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        min-width: 100% !important;
        width: max-content !important;
        animation: scrollAnnouncements 30s linear infinite !important;
    }

    .announcement-item {
        display: inline-block !important;
        flex: 0 0 auto !important;
        padding-right: 80px !important;
        /* Space between announcements */
        white-space: nowrap !important;
        font-size: 11px !important;
        text-align: center;
    }
}

/* Fresh Drops Mobile - 3 items per row (33.33%) */
@media (max-width: 768px) {
    .fresh-drops-grid .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .fresh-drops-grid .col-4 {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-bottom: 20px !important;
        flex: 0 0 33.333333% !important;
        width: 33.333333% !important;
        max-width: 33.333333% !important;
    }

    .fresh-drops-grid .drop-img-wrapper img {
        width: 75px !important;
        /* Slightly smaller to fit 3 in a row */
        height: 75px !important;
        object-fit: cover !important;
    }

    .fresh-drops-grid h6 {
        font-size: 11px !important;
        margin-top: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Craftsmanship Video - Ensure content stays inside the video area */
@media (max-width: 768px) {
    .craftsmanship-section {
        position: relative !important;
        height: 520px !important;
        /* Increased height to contain all mobile text */
        overflow: hidden !important;
        margin: 40px 0 !important;
    }

    .video-background {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
    }

    .craftsmanship-overlay {
        position: absolute !important;
        /* Absolute placement inside relative section */
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10 !important;
        width: 90% !important;
        text-align: center !important;
        padding: 0 15px !important;
        opacity: 1 !important;
    }

    .craftsmanship-tag {
        display: inline-block !important;
        padding: 8px 18px !important;
        font-size: 11px !important;
        letter-spacing: 2px !important;
        margin-bottom: 20px !important;
        background: var(--primary-pink) !important;
        color: white !important;
        border-radius: 50px !important;
        text-transform: uppercase;
    }

    .craftsmanship-title {
        font-size: 28px !important;
        line-height: 1.1 !important;
        margin-bottom: 15px !important;
        display: block !important;
        color: white !important;
    }

    .craftsmanship-subtitle {
        font-size: 16px !important;
        margin-bottom: 20px !important;
        display: block !important;
        color: var(--primary-pink) !important;
    }

    .craftsmanship-desc {
        display: none !important;
        /* Hide long desc on mobile to avoid overflow */
    }

    .craftsmanship-cta {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
}

/* Header Adjustments */
@media (max-width: 991px) {
    .header-icon {
        padding: 8px 10px;
    }

    .header-icon span {
        display: none !important;
    }

    .logo-img {
        max-height: 45px;
    }
}

/* Hero Slider Controls Scaling */
@media (max-width: 768px) {
    .hero-slider .carousel-item {
        height: 60vh !important;
        min-height: 300px !important;
    }

    .hero-slide-img {
        height: 60vh !important;
        min-height: 300px !important;
    }

    .carousel-indicators [data-bs-target] {
        width: 8px !important;
        height: 8px !important;
    }

    .hero-slide-content {
        padding: 0 20px !important;
        max-width: 80% !important;
    }

    .hero-slide-title {
        font-size: 20px !important;
    }

    .hero-slide-tag {
        font-size: 10px !important;
    }

    .hero-slide-btn {
        padding: 8px 20px !important;
        font-size: 12px !important;
    }
}

/* Category Slider Scale Down */
@media (max-width: 768px) {
    .category-card {
        width: 100px !important;
    }

    .category-image-wrapper {
        width: 80px !important;
        height: 80px !important;
    }

    .category-name {
        font-size: 12px !important;
    }

    .slider-control {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
}

/* Cart Template - Mobile Grid Layout */
@media (max-width: 767px) {
    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: 25px;
        border: 1px solid #eee;
        border-radius: 15px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    }

    .cart-table td {
        text-align: left !important;
        padding: 10px 0 !important;
        border: none !important;
    }

    .cart-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 12px;
        color: #999;
        width: 100%;
        margin-bottom: 5px;
    }

    .cart-table td[data-label="Product"] {
        padding-top: 0 !important;
    }

    .cart-table td[data-label="Product"]:before {
        display: none;
    }

    .cart-table .cart-product-img {
        width: 80px !important;
        height: 80px !important;
    }

    .cart-product-info {
        flex: 1;
    }

    .cart-product-name {
        font-size: 14px !important;
    }

    .coupon-section .input-group {
        flex-direction: column;
    }

    .coupon-section .btn {
        width: 100%;
        margin-top: 10px !important;
        margin-left: 0 !important;
    }
}

/* General Layout Tweaks */
@media (max-width: 576px) {
    .section-title {
        font-size: 20px !important;
        margin-bottom: 20px;
    }

    .container {
        padding: 0 15px;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Force 2 items per row on very small screens for better grid use */
    .row-cols-2>* {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Admin Orders Table Mobile */
@media (max-width: 991px) {
    #ordersTable thead {
        display: none;
    }

    #ordersTable,
    #ordersTable tbody,
    #ordersTable tr,
    #ordersTable td {
        display: block;
        width: 100%;
    }

    #ordersTable tr {
        margin-bottom: 20px;
        border-bottom: 2px solid #f8f9fa;
        padding: 15px 0;
    }

    #ordersTable td {
        border: none;
        padding: 8px 15px !important;
    }

    #ordersTable td:before {
        content: attr(data-label);
        font-weight: 700;
        float: left;
        width: 40%;
        color: #666;
        font-size: 12px;
    }
}