/* 
=================================================
  PREMIUM UI & UX ENHANCEMENTS (Doğru Home Store)
================================================= 
*/

/* --- 1. GLOBAL TYPOGRAPHY & SMOOTHING --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body, h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea {
    font-family: 'Outfit', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. MICRO-ANIMATIONS & HOVER EFFECTS --- */
/* Product Cards */
.product-cart-wrap {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    border-radius: 15px !important;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.product-cart-wrap:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
    border-color: rgba(59, 183, 126, 0.3) !important;
}

/* Buttons and Links */
.btn, .button, button {
    transition: all 0.3s ease-in-out !important;
    border-radius: 8px !important;
}

.btn:hover, .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 183, 126, 0.2) !important;
}

/* --- 3. GLASSMORPHISM (FROSTED GLASS EFFECT) --- */
/* Sticky Header */
.header-bottom.sticky-bar.stick {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mini Cart Dropdown */
.cart-dropdown-wrap {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Popups & Modals */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255,255,255,0.6) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

/* --- 4. COLOR PALETTE OPTIMIZATION (GRADIENTS) --- */
/* Primary Brand Buttons */
.btn-brand, .bg-brand {
    background: linear-gradient(135deg, #3BB77E 0%, #2a9662 100%) !important;
    border: none !important;
    color: #fff !important;
}

.btn-brand:hover {
    background: linear-gradient(135deg, #2a9662 0%, #1e744a 100%) !important;
}

/* Action Labels (Badges) */
.product-badges span.hot {
    background: linear-gradient(135deg, #f74b81 0%, #d82b60 100%) !important;
}
.product-badges span.sale {
    background: linear-gradient(135deg, #F6A400 0%, #e09400 100%) !important;
}
.product-badges span.new {
    background: linear-gradient(135deg, #3BB77E 0%, #2a9662 100%) !important;
}

/* --- 5. MOBILE UX (FLOATING BOTTOM ACTION BAR) --- */
@media only screen and (max-width: 768px) {
    /* Improve tap targets */
    .btn, button, input {
        min-height: 44px;
    }
    
    .detail-extralink {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px !important;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .detail-extralink .detail-qty {
        margin: 0 !important;
        flex: 0 0 auto;
    }
    
    .detail-extralink .product-extra-link2 {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .detail-extralink .button.button-add-to-cart {
        flex: 1;
        display: flex;
        justify-content: center;
        padding: 10px 15px !important;
        min-width: 120px;
    }
}

/* --- 6. SKELETON LOADING ANIMATION (UTILITY) --- */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
    color: transparent !important;
    border-radius: 8px;
}

/* --- 7. PRODUCT CARD ALIGNMENT & SIZING --- */
.product-cart-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-cart-wrap .product-img-action-wrap {
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.product-cart-wrap .product-img-action-wrap .product-img,
.product-cart-wrap .product-img-action-wrap .product-img a {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-cart-wrap .product-img-action-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-cart-wrap .product-content-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-cart-wrap .product-price {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #3BB77E !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-cart-wrap .product-price span.old-price {
    font-size: 14px !important;
    color: #999 !important;
    text-decoration: line-through !important;
}

/* Mobile Product Grid Slider Fix */
@media only screen and (max-width: 768px) {
    .row.product-grid-4, .row.product-grid-3 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 15px;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .row.product-grid-4 > [class*="col-"], 
    .row.product-grid-3 > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 5px;
        padding-right: 5px;
        scroll-snap-align: start;
    }
    
    /* Hide scrollbar for cleaner look */
    .row.product-grid-4::-webkit-scrollbar,
    .row.product-grid-3::-webkit-scrollbar {
        display: none;
    }
    .row.product-grid-4, .row.product-grid-3 {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .product-cart-wrap .product-img-action-wrap {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 183, 126, 0.2) !important;
}

/* --- 3. GLASSMORPHISM (FROSTED GLASS EFFECT) --- */
/* Sticky Header */
.header-bottom.sticky-bar.stick {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Mini Cart Dropdown */
.cart-dropdown-wrap {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Popups & Modals */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255,255,255,0.6) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

/* --- 4. COLOR PALETTE OPTIMIZATION (GRADIENTS) --- */
/* Primary Brand Buttons */
.btn-brand, .bg-brand {
    background: linear-gradient(135deg, #3BB77E 0%, #2a9662 100%) !important;
    border: none !important;
    color: #fff !important;
}

.btn-brand:hover {
    background: linear-gradient(135deg, #2a9662 0%, #1e744a 100%) !important;
}

/* Action Labels (Badges) */
.product-badges span.hot {
    background: linear-gradient(135deg, #f74b81 0%, #d82b60 100%) !important;
}
.product-badges span.sale {
    background: linear-gradient(135deg, #F6A400 0%, #e09400 100%) !important;
}
.product-badges span.new {
    background: linear-gradient(135deg, #3BB77E 0%, #2a9662 100%) !important;
}

/* --- 5. MOBILE UX (FLOATING BOTTOM ACTION BAR) --- */
@media only screen and (max-width: 768px) {
    /* Improve tap targets */
    .btn, button, input {
        min-height: 44px;
    }
    
    .detail-extralink {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px !important;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .detail-extralink .detail-qty {
        margin: 0 !important;
        flex: 0 0 auto;
    }
    
    .detail-extralink .product-extra-link2 {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .detail-extralink .button.button-add-to-cart {
        flex: 1;
        display: flex;
        justify-content: center;
        padding: 10px 15px !important;
        min-width: 120px;
    }
}

/* --- 6. SKELETON LOADING ANIMATION (UTILITY) --- */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%);
    background-size: 1000px 100%;
    color: transparent !important;
    border-radius: 8px;
}

/* --- 7. PRODUCT CARD ALIGNMENT & SIZING --- */
.product-cart-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-cart-wrap .product-img-action-wrap {
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.product-cart-wrap .product-img-action-wrap .product-img,
.product-cart-wrap .product-img-action-wrap .product-img a {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-cart-wrap .product-img-action-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-cart-wrap .product-content-wrap {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-cart-wrap .product-price {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #3BB77E !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-cart-wrap .product-price span.old-price {
    font-size: 14px !important;
    color: #999 !important;
    text-decoration: line-through !important;
}

/* Mobile Product Grid Slider Fix */
@media only screen and (max-width: 768px) {
    .row.product-grid-4, .row.product-grid-3 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 15px;
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .row.product-grid-4 > [class*="col-"], 
    .row.product-grid-3 > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 5px;
        padding-right: 5px;
        scroll-snap-align: start;
    }
    
    /* Hide scrollbar for cleaner look */
    .row.product-grid-4::-webkit-scrollbar,
    .row.product-grid-3::-webkit-scrollbar {
        display: none;
    }
    .row.product-grid-4, .row.product-grid-3 {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .product-cart-wrap .product-img-action-wrap {
        height: 180px; /* smaller images on mobile */
    }
}


/* Trendyol Style Story */
.ty-story-container { display: flex; gap: 15px; overflow-x: auto; padding: 20px 10px; margin-bottom: 20px; -ms-overflow-style: none; scrollbar-width: none; background: #fff; }
.ty-story-container::-webkit-scrollbar { display: none; }
.ty-story-item { display: flex; flex-direction: column; align-items: center; min-width: 86px; max-width: 86px; cursor: pointer; text-decoration: none !important; position: relative; }
.ty-story-circle { width: 82px; height: 82px; border-radius: 50%; padding: 2px; background: #e2e2e2; position: relative; }
.ty-story-circle img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #fff; box-sizing: border-box; }
.ty-story-title { font-size: 12px; font-weight: 500; color: #333; text-align: center; margin-top: 6px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.ty-story-badge { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: #e60000; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; border: 1.5px solid #fff; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.15); z-index: 2; letter-spacing: 0.2px; }

/* --- PRODUCT CARD PREMIUM REDESIGN --- */
.premium-card-wrapper { border-radius: 16px !important; border: 1px solid #f0f0f0 !important; background: #fff; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; position: relative; overflow: hidden; }
.premium-card-wrapper:hover { transform: translateY(-6px) !important; box-shadow: 0 12px 35px rgba(232, 93, 4, 0.1) !important; border-color: rgba(242, 122, 26, 0.2) !important; }
.premium-card-wrapper::after { content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 100%; background: radial-gradient(ellipse at top, rgba(242, 122, 26, 0.04), transparent 70%); transition: all 0.4s; transform: translateX(-50%); pointer-events: none; }
.premium-card-wrapper:hover::after { width: 100%; }


/* --- FIX CAROUSEL EQUAL HEIGHT & GAPS --- */
.carausel-4-columns .slick-track { display: flex !important; align-items: stretch !important; }
.carausel-4-columns .slick-slide { height: auto !important; display: flex !important; }
.carausel-4-columns .slick-slide > div { width: 100%; height: 100% !important; display: flex; flex-direction: column; }
.carausel-4-columns .product-cart-wrap { height: 100% !important; flex: 1; }


.carausel-3-columns .slick-track { display: flex !important; align-items: stretch !important; }
.carausel-3-columns .slick-slide { height: auto !important; display: flex !important; }
.carausel-3-columns .slick-slide > div { width: 100%; height: 100% !important; display: flex; flex-direction: column; }
.carausel-3-columns .product-cart-wrap { height: 100% !important; flex: 1; }
