/* =========================
   HOME PAGE STYLES
   Alka Kilit - Modern & Clean
========================= */

/* =========================
   BUTTONS GLOBAL
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Exo 2', Arial, sans-serif;
}

.btn_primary {
    background: #ff7a00;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.3);
}

.btn_primary:hover {
    background: #e56e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.4);
}

.btn_white {
    background: #fff;
    color: #111827;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn_white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn_outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn_outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn_outline_dark {
    background: transparent;
    color: #111827;
    border: 2px solid #111827;
}

.btn_outline_dark:hover {
    background: #111827;
    color: #fff;
    transform: translateY(-2px);
}

/* =========================
   HERO SECTION
========================= */

.hero_section {
    position: relative;
    max-width: 1350px;
    margin: 0 auto;
    min-height: 550px;
    background: url('/son3/public/assets/img/hero.jpg') center / cover no-repeat;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

.hero_overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.hero_text {
    position: relative;
    z-index: 1;
    padding: 60px;
    max-width: 650px;
}

.hero_badge {
    display: inline-block;
    background: #ff7a00;
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.hero_text h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.hero_text p {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.hero_actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* =========================
   FEATURED CATEGORIES
========================= */

.sample_products {
    max-width: 1350px;
    margin: 40px auto 0;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.sample_product_left,
.sample_product_right {
    position: relative;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    transition: transform 0.3s ease;
}

.sample_product_left {
    background: url('/son3/public/assets/img/yangin.png') center / cover no-repeat;
}

.sample_product_right {
    background: url('/son3/public/assets/img/cabinet.jpg') center / cover no-repeat;
}

.sample_product_left:hover,
.sample_product_right:hover {
    transform: translateY(-5px);
}

.sample_product_left::before,
.sample_product_right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.sample_content {
    position: relative;
    z-index: 1;
    padding: 40px;
    color: #fff;
}

.category_tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.sample_content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sample_content p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    max-width: 400px;
}

/* =========================
   CATEGORY CARDS
========================= */

.home_shopping {
    max-width: 1350px;
    margin: 60px auto 0;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.home_shop {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.home_shop:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.home_shop_image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home_shop_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home_shop:hover .home_shop_image img {
    transform: scale(1.08);
}

.home_shop_content {
    padding: 24px;
}

.home_shop_content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.home_shop_content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* =========================
   BESTSELLERS SECTION
========================= */

.topsellers {
    width: 100%;
    background: #fafafa;
    margin-top: 70px;
    padding: 60px 0;
}

.topsellers_header {
    max-width: 1350px;
    margin: 0 auto 40px;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topsellers_header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.topsellers_header p {
    font-size: 15px;
    color: #666;
}

.view_all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: #ff7a00;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.view_all:hover {
    background: rgba(255, 122, 0, 0.08);
}

.view_all svg {
    transition: transform 0.3s ease;
}

.view_all:hover svg {
    transform: translateX(4px);
}

.topsellers_grid {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.topseller {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.topseller:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.topseller_link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 20px 20px 0;
}

.topseller_image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.topseller_image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.topseller:hover .topseller_image img {
    transform: scale(1.05);
}

.topseller_info {
    padding-bottom: 16px;
}

.topseller_title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topseller_price {
    font-size: 18px;
    font-weight: 700;
    color: #ff7a00;
}

.topseller .btn_primary {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    justify-content: center;
    padding: 10px;
    font-size: 14px;
}

/* =========================
   VARIANT MODAL - RESPONSIVE LAYOUT
========================= */

.variant_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.variant_modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    width: 95%;
    max-width: 820px;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10001;
    animation: slideUpDesktop 0.3s ease forwards;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpDesktop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.variant_content {
    position: relative;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
}

.close_variant {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    z-index: 10;
}

.close_variant:hover {
    background: #e53935;
    color: #fff;
    transform: rotate(90deg);
}

/* =========================
   MODAL LAYOUT - DESKTOP (Side by Side)
========================= */

.variant_layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* LEFT SIDE - Image */
.variant_left {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.variant_image_wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant_main_image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
}

.variant_main_image:hover {
    transform: scale(1.05);
}

.variant_gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant_gallery img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variant_gallery img:hover {
    border-color: #ff7a00;
    transform: scale(1.1);
}

.variant_gallery img.active {
    border-color: #ff7a00;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
}

/* RIGHT SIDE - Details */
.variant_right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Desktop Title (hidden on mobile) */
.variant_desktop_header {
    display: block;
}

.variant_desktop_header .variant_title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.variant_desktop_header .variant_desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Mobile Title (hidden on desktop) */
.variant_mobile_header {
    display: none;
}

/* Price Section */
.variant_price_section {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.variant_price_label {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.variant_price {
    font-size: 28px;
    font-weight: 700;
    color: #ff7a00;
}

/* Selector */
.variant_selector {
    margin-bottom: 5px;
}

.variant_selector label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
}

#variant_select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-family: 'Exo 2', Arial, sans-serif;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

#variant_select:focus {
    outline: none;
    border-color: #ff7a00;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #ff7a00;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.3);
    font-family: 'Exo 2', Arial, sans-serif;
    margin-top: 5px;
}

.add-to-cart:hover {
    background: #e56e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.4);
}

.add-to-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================
   RESPONSIVE - TABLET
========================= */

@media (max-width: 992px) {
    .variant_modal {
        max-width: 700px;
    }
    
    .variant_layout {
        gap: 20px;
    }
    
    .variant_desktop_header .variant_title {
        font-size: 20px;
    }
    
    .variant_price {
        font-size: 24px;
    }
}

/* =========================
   RESPONSIVE - MOBILE (Centered with margins)
========================= */

@media (max-width: 768px) {
    /* Modal - centered with margins on mobile */
    .variant_modal {
        width: calc(100% - 24px);
        max-width: 480px;
        max-height: 90vh;
        border-radius: 16px;
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%) scale(0.92);
        animation: none;
        margin: 0;
    }
    
    .variant_modal.active {
        transform: translate(-50%, -50%) scale(1);
        animation: slideUpMobile 0.3s ease forwards;
    }
    
    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.92);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }
    
    .variant_content {
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    /* Stack layout on mobile */
    .variant_layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Mobile: Title shows here */
    .variant_mobile_header {
        display: block;
        margin-bottom: 15px;
    }
    
    .variant_mobile_header .variant_title {
        font-size: 20px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }
    
    .variant_mobile_header .variant_price {
        font-size: 22px;
        font-weight: 700;
        color: #ff7a00;
    }
    
    /* Desktop: Title hidden on mobile */
    .variant_desktop_header {
        display: none;
    }
    
    /* Image on mobile - appears second */
    .variant_left {
        order: 1;
    }
    
    .variant_image_wrapper {
        aspect-ratio: 4/3;
        max-height: 280px;
    }
    
    .variant_main_image {
        padding: 15px;
    }
    
    .variant_gallery {
        justify-content: center;
        margin-top: 5px;
    }
    
    .variant_gallery img {
        width: 50px;
        height: 50px;
    }
    
    /* Details on mobile - appears third */
    .variant_right {
        order: 2;
        gap: 15px;
        margin-top: 15px;
    }
    
    .variant_price_section {
        padding: 12px 0;
    }
    
    .variant_price {
        font-size: 22px;
    }
    
    .variant_details {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .add-to-cart {
        padding: 12px;
        font-size: 15px;
        margin-top: 0;
    }
    
    .close_variant {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* =========================
   EXTRA SMALL SCREENS
========================= */

@media (max-width: 480px) {
    .variant_modal {
        width: calc(100% - 16px);
        max-width: 400px;
        max-height: 95vh;
    }
    
    .variant_content {
        padding: 15px 12px;
        max-height: 90vh;
    }
    
    .variant_mobile_header .variant_title {
        font-size: 18px;
    }
    
    .variant_mobile_header .variant_price {
        font-size: 20px;
    }
    
    .variant_image_wrapper {
        max-height: 200px;
    }
    
    .variant_gallery img {
        width: 40px;
        height: 40px;
    }
    
    .variant_price_section {
        padding: 10px 0;
    }
    
    .variant_price {
        font-size: 20px;
    }
    
    #variant_select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .add-to-cart {
        padding: 10px;
        font-size: 14px;
    }
    
    .close_variant {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }
}

/* =========================
   RESPONSIVE - HOME PAGE SECTIONS
========================= */

@media (max-width: 1200px) {
    .topsellers_grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .hero_section {
        min-height: 450px;
    }

    .hero_text {
        padding: 40px;
    }

    .hero_text h1 {
        font-size: 32px;
    }

    .sample_products {
        grid-template-columns: 1fr;
    }

    .sample_product_left,
    .sample_product_right {
        height: 350px;
    }

    .home_shopping {
        grid-template-columns: repeat(2, 1fr);
    }

    .topsellers_grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero_section {
        min-height: 400px;
        border-radius: 0;
    }

    .hero_text {
        padding: 30px 20px;
    }

    .hero_text h1 {
        font-size: 26px;
    }

    .hero_text p {
        font-size: 15px;
    }

    .hero_actions {
        flex-direction: column;
        gap: 10px;
    }

    .hero_actions .btn {
        width: 100%;
        justify-content: center;
    }

    .sample_content {
        padding: 30px 20px;
    }

    .sample_content h2 {
        font-size: 22px;
    }

    .home_shopping {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }

    .home_shop_image {
        height: 200px;
    }

    .topsellers {
        padding: 40px 0;
        margin-top: 50px;
    }

    .topsellers_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
    }

    .topsellers_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .topseller_image {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .hero_section {
        min-height: 350px;
    }

    .hero_text h1 {
        font-size: 22px;
    }

    .hero_badge {
        font-size: 11px;
        padding: 4px 12px;
    }

    .sample_product_left,
    .sample_product_right {
        height: 280px;
    }

    .sample_content h2 {
        font-size: 20px;
    }

    .topsellers_grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .topseller {
        border-radius: 12px;
    }

    .topseller_image {
        height: 140px;
    }

    .topseller_title {
        font-size: 13px;
    }

    .topseller_price {
        font-size: 16px;
    }

    .topseller .btn_primary {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
        font-size: 13px;
    }
}

/* =========================
   VARIANT MATERIAL & SIZE BUTTONS
========================= */

.variant_material_section,
.variant_size_section {
    margin-bottom: 15px;
}

.variant_material_section label,
.variant_size_section label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
}

.variant_material_options,
.variant_size_options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant_material_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 10px;
    border-radius: 30px;
    border: 2px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Exo 2', Arial, sans-serif;
}

.variant_material_btn:hover {
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.variant_material_btn.active {
    border-color: #ff7a00;
    background: #fff5ed;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.15);
}

.variant_material_btn .material_color_dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: inline-block;
}

.variant_material_btn .material_name {
    font-weight: 500;
}

.variant_size_btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Exo 2', Arial, sans-serif;
    min-width: 50px;
    text-align: center;
}

.variant_size_btn:hover {
    border-color: #ccc;
    transform: translateY(-2px);
}

.variant_size_btn.active {
    border-color: #ff7a00;
    background: #ff7a00;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.3);
}

.variant_size_btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.variant_size_btn:disabled:hover {
    border-color: #e0e0e0;
    transform: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .variant_material_btn {
        padding: 6px 14px 6px 8px;
        font-size: 13px;
    }
    
    .variant_material_btn .material_color_dot {
        width: 18px;
        height: 18px;
    }
    
    .variant_size_btn {
        padding: 6px 14px;
        font-size: 13px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .variant_material_btn {
        padding: 5px 12px 5px 7px;
        font-size: 12px;
    }
    
    .variant_material_btn .material_color_dot {
        width: 16px;
        height: 16px;
    }
    
    .variant_size_btn {
        padding: 5px 12px;
        font-size: 12px;
        min-width: 40px;
    }
}