/* Bulk Order Specific Styles - Comprehensive Responsive Design */

/* ===================================================
   GLOBAL RESPONSIVE UTILITIES
   =================================================== */

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* Prevent text overflow globally */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive container fixes */
.container,
.container-fluid,
.container-two {
    max-width: 100%;
    overflow: hidden;
}

/* Fix for Header Dropdown Visibility */
.header-area .container-fluid {
    overflow: visible !important;
}

/* Prevent form elements from overflowing */
input,
select,
textarea,
button {
    max-width: 100%;
}

/* Select wrapper for consistent width control */
.select-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.select-wrapper select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    /* mobile-safe */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ===================================================
   MOBILE FIRST - Extra Small Devices (320px - 480px)
   =================================================== */

@media (max-width: 767px) {

    /* Mobile-only hardening - CRITICAL: FIXES flex overflow */
    .form-group,
    .col-md-6,
    .col-xl-12 {
        min-width: 0 !important;
        /* CRITICAL for Bootstrap columns */
    }

    .select-wrapper select {
        font-size: 14px !important;
        padding-right: 40px !important;
        /* space for dropdown arrow */
    }

    /* Hero Section */
    .bulk-hero-section {
        padding: 40px 15px !important;
        background-size: cover;
        background-position: center;
    }

    .hero-content h2 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .hero-highlight {
        padding: 15px 20px 15px 35px !important;
        font-size: 14px !important;
        margin: 20px 0;
    }

    .hero-highlight i {
        font-size: 30px !important;
    }

    .hero-highlight p {
        font-size: 14px !important;
    }

    /* Buttons */
    .hero-buttons {
        margin-top: 20px;
    }

    .btn-callback,
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
        padding: 14px 20px !important;
        font-size: 15px !important;
    }

    /* Form */
    .bulk-order-form {
        padding: 25px 20px !important;
    }

    .bulk-order-form h3 {
        font-size: 22px !important;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        width: 100% !important;
        font-size: 15px !important;
        padding: 12px 15px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix select dropdown overflow on mobile - ULTIMATE FIX */
    .select-wrapper {
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        position: relative !important;
        box-sizing: border-box !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .contact-form select {
        width: 100% !important;
        max-width: calc(100vw - 80px) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        padding: 12px 35px 12px 15px !important;
        margin: 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: 12px !important;
        background-color: rgba(255, 255, 255, 0.7) !important;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
        background-repeat: no-repeat !important;
        background-position: right 10px center !important;
        background-size: 14px !important;
        font-size: 14px !important;
        min-height: 48px !important;
    }

    .contact-form select option {
        font-size: 14px !important;
        padding: 10px !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Additional mobile form fixes */
    .form-group {
        margin-bottom: 15px !important;
    }

    /* Ensure all form elements are properly contained */
    .bulk-order-form .row>* {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Section Headings */
    .section-heading h3 {
        font-size: 24px !important;
    }

    .section-subtitle {
        font-size: 15px !important;
    }

    /* Process Steps */
    .bulk-order-process-section {
        padding: 40px 15px !important;
    }

    .step-box {
        padding: 20px 15px !important;
        margin-bottom: 15px;
    }

    .step-icon {
        font-size: 35px !important;
    }

    .step-box h4 {
        font-size: 18px !important;
    }

    .step-box p {
        font-size: 14px !important;
    }

    /* Trust Section */
    .fm11-trust-section {
        padding: 40px 15px !important;
    }

    /* Mission & Vision */
    .mission-vision-section {
        padding: 40px 15px !important;
    }

    .policy-card {
        padding: 25px 20px !important;
    }

    .policy-card .diamond-highlight {
        font-size: 16px !important;
    }

    .policy-card p {
        font-size: 15px !important;
    }

    .policy-card img {
        max-height: 150px !important;
    }

    /* Portfolio */
    .design-portfolio-section {
        padding: 40px 15px !important;
    }

    .portfolio-icon {
        font-size: 40px !important;
    }

    .portfolio-content h4 {
        font-size: 18px !important;
    }

    .portfolio-content p {
        font-size: 13px !important;
    }

    /* Features */
    .feature-area {
        padding: 40px 15px !important;
    }

    .sin-feature {
        margin-bottom: 15px;
    }

    /* Collections Slider - Hide complex controls on mobile */
    .slider-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
    }

    /* Container adjustments */
    .container-two {
        padding: 0 15px;
    }

    /* Prevent any horizontal overflow */
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .container,
    .container-fluid,
    .container-two,
    .row {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .bulk-hero-section .row,
    .bulk-order-form .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }

    /* Ensure form itself doesn't overflow */
    .bulk-order-form,
    .contact-form {
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }


    /* Category cards mobile optimization */
    .category-card {
        min-width: 200px !important;
        padding: 20px 25px !important;
    }

    .category-card h4 {
        font-size: 15px !important;
    }
}

/* ===================================================
   SMALL DEVICES - Tablets Portrait (481px - 768px)
   =================================================== */

@media (min-width: 481px) and (max-width: 768px) {

    /* Hero Section */
    .bulk-hero-section {
        padding: 60px 20px !important;
    }

    .hero-content h2 {
        font-size: 36px !important;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-highlight {
        font-size: 16px !important;
        padding: 20px 25px 20px 40px !important;
    }

    /* Buttons */
    .btn-callback,
    .btn-whatsapp {
        padding: 15px 24px !important;
        font-size: 16px !important;
    }

    /* Form */
    .bulk-order-form {
        padding: 30px 20px !important;
        margin: 0 10px !important;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 16px !important;
        padding: 12px 16px !important;
        height: 50px !important;
    }

    .contact-form textarea {
        height: auto !important;
        min-height: 120px !important;
    }

    /* Sections */
    .bulk-order-process-section,
    .fm11-trust-section,
    .mission-vision-section,
    .design-portfolio-section {
        padding: 60px 20px !important;
    }

    /* Step boxes */
    .step-box {
        padding: 25px 20px !important;
    }

    /* Portfolio */
    .portfolio-item {
        margin-bottom: 20px;
    }

    .portfolio-icon {
        font-size: 45px !important;
    }

    .portfolio-content h4 {
        font-size: 20px !important;
    }

    /* Policy Cards */
    .policy-card {
        padding: 30px 25px !important;
    }

    .policy-card img {
        max-height: 180px !important;
    }
}

/* ===================================================
   MEDIUM DEVICES - Tablets Landscape (769px - 1024px)
   =================================================== */

@media (min-width: 769px) and (max-width: 1024px) {

    /* Hero Section */
    .bulk-hero-section {
        padding: 80px 30px !important;
    }

    .hero-content h2 {
        font-size: 42px;
    }

    /* Form */
    .bulk-order-form {
        padding: 40px 30px;
        max-width: 100%;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 16px;
        height: 52px;
    }

    .contact-form textarea {
        height: auto;
        min-height: 130px;
    }

    /* Sections */
    .bulk-order-process-section,
    .fm11-trust-section,
    .mission-vision-section,
    .design-portfolio-section {
        padding: 80px 30px !important;
    }

    /* Portfolio Grid - 2 columns on tablet landscape */
    .portfolio-item {
        margin-bottom: 25px;
    }

    /* Step Boxes */
    .step-box {
        padding: 30px 25px;
    }

    /* Container */
    .container-two {
        max-width: 960px;
        padding: 0 20px;
    }

    /* Form elements on tablet landscape */
    .bulk-order-form {
        padding: 45px 35px;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 16px;
        height: 54px;
        padding: 0 18px;
    }

    .contact-form textarea {
        height: auto;
        min-height: 140px;
        padding: 18px;
    }
}

/* ===================================================
   LARGE DEVICES - Desktop (1025px - 1440px)
   =================================================== */

@media (min-width: 1025px) and (max-width: 1440px) {

    /* Container */
    .container-two {
        max-width: 1200px;
    }

    /* Hero */
    .hero-content h2 {
        font-size: 48px;
    }

    /* Sections maintain default padding */
    .bulk-order-process-section,
    .fm11-trust-section,
    .mission-vision-section,
    .design-portfolio-section {
        padding: 80px 40px !important;
    }

    /* Portfolio - 4 columns */
    .portfolio-item:hover {
        transform: translateY(-8px);
    }

    /* Step boxes even heights */
    .step-box {
        min-height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* ===================================================
   EXTRA LARGE DEVICES - Large Desktop (1441px+)
   =================================================== */

@media (min-width: 1441px) {

    /* Container */
    .container-two {
        max-width: 1400px;
    }

    /* Hero */
    .hero-content h2 {
        font-size: 52px;
    }

    .hero-content p {
        font-size: 19px;
    }

    /* Larger spacing for big screens */
    .bulk-order-process-section,
    .fm11-trust-section,
    .mission-vision-section,
    .design-portfolio-section {
        padding: 100px 50px !important;
    }

    /* Portfolio */
    .portfolio-item {
        margin-bottom: 30px;
    }

    .portfolio-content h4 {
        font-size: 24px;
    }

    .portfolio-content p {
        font-size: 16px;
    }

    /* Step boxes */
    .step-box {
        min-height: 320px;
    }
}

/* ===================================================
   ADDITIONAL RESPONSIVE FIXES
   =================================================== */

/* Fix for gap utility across all breakpoints */
@media (max-width: 576px) {
    .g-4 {
        --bs-gutter-x: 1rem !important;
        --bs-gutter-y: 1rem !important;
    }

    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row>* {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Ensure images are always responsive */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }

    .portfolio-image {
        aspect-ratio: 1 / 1;
    }
}

/* Touch-friendly hover states on mobile */
@media (hover: none) and (pointer: coarse) {
    .portfolio-overlay {
        opacity: 0;
    }

    .portfolio-item:active .portfolio-overlay {
        opacity: 1;
    }

    .step-box:hover {
        transform: none;
    }

    .portfolio-item:hover {
        transform: none;
    }

    /* Show overlay on tap */
    .portfolio-item:active {
        transform: translateY(-5px);
    }
}

/* Print Styles */
@media print {

    .bulk-hero-section,
    .design-portfolio-section {
        background-image: none !important;
    }

    .hero-buttons,
    .slider-btn,
    .btn-callback,
    .btn-whatsapp {
        display: none !important;
    }

    .step-box,
    .portfolio-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .portfolio-icon {
        animation: none !important;
    }

    .step-box,
    .portfolio-item,
    .btn-callback,
    .btn-whatsapp {
        transition: none !important;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Uncomment and adjust if dark mode is required */
    /*
    .bulk-hero-section {
        background-blend-mode: darken;
    }

    .step-box,
    .portfolio-item,
    .bulk-order-form {
        background: #1a1a1a;
        color: #ffffff;
    }

    .step-box h4,
    .portfolio-content h4 {
        color: #ffffff;
    }
    */
}

/* Categories Carousel Animation */
@keyframes slideCategories {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.categories-carousel-wrapper {
    padding: 50px 0;
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    position: relative;
}

.categories-carousel-container {
    display: flex;
    width: max-content;
    animation: slideCategories 60s linear infinite;
    will-change: transform;
}

.categories-carousel-container:hover {
    animation-play-state: paused;
}

.categories-carousel-item {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 15px;
}

.category-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    min-width: 250px;
    text-align: center;
    flex-shrink: 0;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(225, 30, 18, 0.1);
    border-color: #e11e12;
}

.category-card .category-icon {
    font-size: 48px;
    color: #e11e12;
    margin-bottom: 15px;
}

.category-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1b1b;
    margin: 0;
    text-transform: uppercase;
    font-family: 'Work Sans', sans-serif;
}

.category-card p {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
}