/* SOSYOPIX INSPIRED GLOBAL STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --ty-orange: #0d6efd;
    /* Switched to Blue as requested */
    --ty-gray: #333333;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --border-radius-pill: 50rem;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
    /* Softer shadows */
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* STICKY FOOTER SETUP */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure footer pushes to bottom */
.site-footer {
    margin-top: auto;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    /* Extra bold headings */
    color: #111;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 0.95rem;
}

/* BUTTONS */
.btn {
    border-radius: var(--border-radius-pill) !important;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    text-transform: uppercase;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Removed button color overrides to keep original site colors (or new blue) */

/* CARDS */
.card {
    border: 1px solid #f0f0f0 !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    background: #fff;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* INPUTS */
.form-control,
.form-select {
    border-radius: var(--border-radius-md) !important;
    padding: 12px 16px;
    border-color: #eee;
    background-color: #fcfcfc;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.03);
    border-color: #ddd;
}

/* MOBILE BOTTOM NAVIGATION - MODERN DOCK STYLE */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    padding: 12px 6px 20px 6px;
    /* Extra bottom padding for iOS home indicator area */
    z-index: 1050;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px;
    border-radius: 16px;
    width: 64px;
    /* Fixed width touch target */
}

/* Icons */
.mobile-bottom-nav .mobile-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active State */
.mobile-bottom-nav .mobile-nav-item.active,
.mobile-bottom-nav .mobile-nav-item:active {
    color: var(--ty-orange) !important;
}

.mobile-bottom-nav .mobile-nav-item:active i {
    transform: scale(1.2);
}

/* Center Highlight (Optional: Could be used for Cart or Categories) */
/* Custom Red Button for Drawer */
.btn-custom-red {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-custom-red:active {
    background: #b91c1c !important;
    transform: scale(0.98);
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* PRODUCT GRID */
.product-card-img-wrapper {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 1/1;
    /* Square photos like Sosyopix */
}

/* UTILS */
.rounded-xl {
    border-radius: 16px !important;
}

.rounded-2xl {
    border-radius: 24px !important;
}

.shadow-soft {
    box-shadow: var(--shadow-md) !important;
}

/* PREMIUM BADGES - SOSYOPIX STYLE */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 96, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(255, 96, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 96, 0, 0);
    }
}

.badge-premium-discount {
    background: #000 !important;
    /* Default dark */
    color: white !important;
    font-weight: 800 !important;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Specific Badge Colors */
.badge-sp-renewed {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED) !important;
}

.badge-sp-loved {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
}

.badge-sp-editor {
    background: linear-gradient(135deg, #1F2937, #111827) !important;
}

.badge-sp-bestseller {
    background: linear-gradient(135deg, #10B981, #059669) !important;
    animation: pulse-red 2s infinite;
    /* Only bestseller needs strong pulse maybe? */
}

/* Slider Ribbon Text */
.ribbon-item {
    min-height: 24px;
    font-size: 9px !important;
    /* Slightly smaller but bolder */
    font-weight: 900 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ribbon-item i {
    font-size: 10px;
    margin-right: 4px;
}

.mobile-tags-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.mobile-tag-premium {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    font-weight: 700;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    /* Pill shaped */
}

/* RIBBON SLIDER ANIMATION */
@keyframes slideUp2 {

    0%,
    45% {
        transform: translateY(0);
    }

    50%,
    95% {
        transform: translateY(-24px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes slideUp3 {

    0%,
    30% {
        transform: translateY(0);
    }

    33%,
    63% {
        transform: translateY(-24px);
    }

    66%,
    96% {
        transform: translateY(-48px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes slideUp4 {

    0%,
    20% {
        transform: translateY(0);
    }

    25%,
    45% {
        transform: translateY(-24px);
    }

    50%,
    70% {
        transform: translateY(-48px);
    }

    75%,
    95% {
        transform: translateY(-72px);
    }

    100% {
        transform: translateY(0);
    }
}

.ty-tag-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ty-tag-wrapper.slide-2 {
    animation: slideUp2 3s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

.ty-tag-wrapper.slide-3 {
    animation: slideUp3 4.5s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

.ty-tag-wrapper.slide-4 {
    animation: slideUp4 6s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

.ribbon-item {
    min-height: 24px;
    /* Ensure fixed height for calculation */
}

/* =========================================
   HEADER STYLES (Migrated from header.php)
   ========================================= */

/* :root variables merged or ignored to prefer existing ones */
:root {
    /* --ty-orange: #2563eb;  <-- Ignored to keep #0d6efd */
    --header-bg: #fff;
    --text-color: #333;
    --border-color: #e6e6e6;
}

/* html, body styles ignored as they are already in global file */

.top-bar {
    background: linear-gradient(90deg, #1e3a8a, var(--ty-orange));
    /* Modified to use var */
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
    font-weight: 500;
}

.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.main-header {
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.navbar-brand {
    font-weight: 900;
    color: var(--ty-orange) !important;
    font-size: 28px;
    text-decoration: none;
}

.navbar-brand img {
    max-height: 70px;
    width: auto;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 30px;
}

.header-search input {
    border: 2px solid #f1f1f1;
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 12px 20px 12px 50px;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--ty-orange);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: var(--ty-orange);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0 24px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.search-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icon-item {
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-icon-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.cart-icon-wrapper {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
}

.cart-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: -5px;
    font-weight: 700;
    border: 1px solid #fff;
}

.nav-bar {
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 12px 0;
    border-bottom: 3px solid transparent;
    display: block;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--ty-orange);
    border-bottom-color: var(--ty-orange);
}

.nav-item {
    position: relative;
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #eee;
    z-index: 9999;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
}

.nav-item:hover .dropdown-menu-custom {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 20px;
    color: #555;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #eff6ff;
    color: var(--ty-orange);
}

/* MOBILE HEADER & MENU IMPROVEMENTS - MODERN UX */
.mobile-header-bar {
    display: none;
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.mobile-search-wrapper {
    display: none;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

/* DRAWER CONTAINER */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    transform: translateX(-100%);
    /* Start hidden left */
    /* Ensure no scroll chaining */
    overscroll-behavior: contain;
}

/* Prevent horizontal scroll on body */
body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

.mobile-menu-drawer.active {
    transform: translateX(0);
    /* Slide in to view */
}

/* Specific right-side drawer override */
#categoriesDrawer {
    left: auto;
    right: 0;
    border-radius: 20px 0 0 20px;
    /* Rounded Left */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    transform: translateX(100%);
    /* Start hidden right */
}

#categoriesDrawer.active {
    transform: translateX(0);
    /* Slide in to view */
}

/* OVERLAY */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    /* Modern Glass Effect */
    -webkit-backdrop-filter: blur(8px);
    z-index: 1900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* HEADER INSIDE DRAWER */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px 24px;
    background: #fff;
    /* Sticky header inside drawer */
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
}

.btn-close-menu {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f7f7f7;
    border: none;
    color: #333;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-close-menu:hover {
    background: #eee;
    transform: rotate(90deg);
}

/* MENU LIST */
.mobile-nav-list {
    list-style: none;
    padding: 10px 16px;
    margin: 0;
    flex-grow: 1;
}

.mobile-nav-item {
    border-bottom: none;
    /* Removed borders for cleaner look */
    margin-bottom: 4px;
    display: block;
    /* Override global flex-column style */
}

/* Main Link Style */
.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
}

.mobile-menu-link:active,
.mobile-menu-link:hover {
    background: #f0f7ff;
    /* Light blue tint */
    color: var(--ty-orange);
}

.mobile-menu-link i {
    width: 24px;
    color: #9ca3af;
    font-size: 18px;
    margin-right: 12px;
    transition: color 0.2s;
}

.mobile-menu-link:active i,
.mobile-menu-link:hover i {
    color: var(--ty-orange);
}

/* Accordion Row */
.mobile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Allow clicking parent logic */
}

/* Chevron Button */
.mobile-submenu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    transition: transform 0.3s ease, color 0.2s;
    cursor: pointer;
}

.mobile-submenu-toggle:hover {
    color: var(--ty-orange);
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.mobile-submenu-toggle.rotate {
    transform: rotate(180deg);
    color: var(--ty-orange);
}

/* SUBMENU STYLE */
.mobile-sub-menu {
    display: none;
    /* Ideally we would use max-height transition, but display:none is current logic. */
    padding-left: 16px;
    /* Indent content */
    margin-top: 4px;
    position: relative;
}

/* Vertical line for hierarchy */
.mobile-sub-menu::before {
    content: '';
    position: absolute;
    left: 26px;
    /* Position line under icon center approx */
    top: 0;
    bottom: 0;
    width: 2px;
    background: #f0f0f0;
    border-radius: 2px;
}

.mobile-submenu-link {
    display: block;
    padding: 10px 16px 10px 24px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
    position: relative;
}

.mobile-submenu-link:hover,
.mobile-submenu-link:active {
    color: var(--ty-orange);
    background: #fff;
    padding-left: 28px;
    /* Slight movement */
}

/* FOOTER ACTIONS */
.mobile-menu-footer {
    padding: 24px;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.btn-menu-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed */
    width: 100%;
    padding: 14px 20px;
    /* More side padding */
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    text-align: left;
    /* Changed */
}

.btn-menu-action i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

.btn-menu-action:active {
    transform: scale(0.98);
}

@media (min-width: 1200px) {
    .custom-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
    }
}

@media (max-width: 1199px) {
    .custom-container {
        width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 991px) {

    .header-wrapper,
    .nav-bar,
    .top-bar {
        display: none !important;
    }

    .mobile-header-bar,
    .mobile-search-wrapper {
        display: flex;
    }
}

/* AUTOMATIC FIX: Ensure images are responsive */
/* GLOBAL SLIDER STYLES */
.product-slider-container {
    position: relative;
    /* group class for hover effects */
}

.product-slider-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: smooth;
}

.product-slider-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.product-slider-item {
    min-width: 170px;
    max-width: 170px;
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .product-slider-item {
        min-width: 220px;
        max-width: 220px;
    }
}

/* Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: var(--ty-orange) !important;
    /* Force visibility */
    background: #fff !important;
    transition: none;
}

.slider-btn:hover {
    background: #fff !important;
    color: var(--ty-orange) !important;
    border-color: #e0e0e0 !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-50%) !important;
}

.slider-btn.prev {
    left: 10px;
    /* İçeri aldık - kesilmeyi önler */
}

.slider-btn.next {
    right: 10px;
    /* İçeri aldık */
}

@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }
}