/* ========================================
   RAYY STORE - MAIN STYLESHEET
   Version: 3.2 (Added Sidebar Sections & Footer Links)
   ======================================== */

/* ========== RESET & GLOBAL ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    width: 100%;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== FIX SIDEBAR SCROLL ========== */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 1002;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.sidebar-logo span {
    color: #3b82f6;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-close:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.sidebar-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-avatar i {
    font-size: 60px;
    color: #3b82f6;
}

.sidebar-name {
    font-weight: 600;
    color: #0f172a;
    margin-top: 8px;
}

.sidebar-email {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ========== SIDEBAR SECTION (BARU) ========== */
.sidebar-section {
    margin-top: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-section:last-of-type {
    border-bottom: none;
}

.sidebar-section-title {
    padding: 12px 20px 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.sidebar-section-title i {
    margin-right: 6px;
    font-size: 10px;
    color: #3b82f6;
}

.sidebar-nav {
    padding: 0 0 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 8px;
}

.sidebar-link i {
    width: 20px;
    font-size: 14px;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateX(4px);
}

.sidebar-link.active {
    background: #eef2ff;
    color: #3b82f6;
    border-right: none;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.cart-icon-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-icon-sidebar:hover {
    background: #eef2ff;
    transform: scale(1.02);
}

.cart-icon-sidebar i {
    font-size: 18px;
    color: #3b82f6;
}

.cart-icon-sidebar .cart-count {
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.cart-icon-sidebar span:last-child {
    flex: 1;
    color: #475569;
    font-weight: 500;
}

/* ========== TOP NAVBAR (MOBILE) ========== */
.top-navbar {
    background: #ffffff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 22px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-toggle:hover {
    color: #3b82f6;
    transform: scale(1.05);
}

.logo-small {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.logo-small span {
    color: #3b82f6;
}

.top-cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: #475569;
    transition: all 0.2s;
}

.top-cart-icon:hover {
    color: #3b82f6;
    transform: scale(1.05);
}

.top-cart-icon .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

/* ========== SPLASH SCREEN ========== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.splash-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.splash-container {
    text-align: center;
}

.logo-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    animation: fadeInLogo 0.6s ease forwards;
}

.logo-r {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInText 0.6s ease forwards;
    animation-delay: 0.3s;
}

.brand-text span {
    color: #3b82f6;
}

.brand-line {
    width: 0;
    height: 2px;
    background: #3b82f6;
    margin: 10px auto 0;
    animation: expandLine 0.5s ease forwards;
    animation-delay: 0.6s;
}

@keyframes fadeInLogo {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInText {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes expandLine {
    0% { width: 0; opacity: 0; }
    100% { width: 150px; opacity: 1; }
}

/* ========== MAIN CONTENT ========== */
.main-content {
    opacity: 0;
    transition: opacity 0.4s;
}

.main-content.visible {
    opacity: 1;
}

/* ========== SLIDER SECTION ========== */
.slider-section {
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    background: transparent;
    padding: 0 20px;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
    background: #f1f5f9;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.swiper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
}

.swiper-slide img,
.swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #3b82f6;
    transform: scale(1.05);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
}

.swiper-pagination-bullet-active {
    background: #3b82f6;
}

/* ========== MARQUEE SECTION ========== */
.marquee-section {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 12px 0;
    overflow: hidden;
    margin: 0 0 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
    padding-left: 100%;
}

.marquee-content span {
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    padding-right: 50px;
}

.marquee-content i {
    margin-right: 8px;
    color: #fbbf24;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ========== HERO SECTION ========== */
.hero-section {
    text-align: center;
    padding: 48px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: #64748b;
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ========== SECTION TITLE ========== */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 30px;
}

.section-title:first-of-type {
    margin-top: 0;
}

.section-title i {
    color: #3b82f6;
    font-size: 20px;
}

/* ========== CATEGORIES ========== */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    border-radius: 40px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.category-btn i {
    margin-right: 6px;
    font-size: 12px;
}

.category-btn.active,
.category-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* ========== PRODUCTS GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .products-grid { grid-template-columns: 1fr; }
}

.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f1f5f9;
    transition: transform 0.3s;
}

.product-card:hover .product-thumbnail {
    transform: scale(1.02);
}

.product-info {
    padding: 14px;
}

.product-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-category {
    color: #3b82f6;
    font-size: 11px;
    margin-bottom: 8px;
    display: inline-block;
    background: #eef2ff;
    padding: 3px 10px;
    border-radius: 20px;
}

.product-price {
    color: #0f172a;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.product-stock {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 10px;
}

.stock-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.stock-available { background: #dcfce7; color: #16a34a; }
.stock-low { background: #fef3c7; color: #d97706; animation: pulseWarning 1s infinite; }
.stock-out { background: #fee2e2; color: #dc2626; }

@keyframes pulseWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.voucher-badge {
    display: inline-block;
    background: #fef3c7;
    color: #d97706;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 5px;
}

.voucher-badge.disabled {
    background: #fee2e2;
    color: #dc2626;
}

/* ========== ADD TO CART BUTTON ========== */
.add-to-cart {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 10px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.add-to-cart:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========== CART SIDEBAR ========== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100%;
    background: #ffffff;
    z-index: 1003;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open { right: 0; }

.cart-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 { color: #0f172a; font-size: 16px; }

.close-cart {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #475569;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-cart:hover { background: #e2e8f0; transform: scale(1.05); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.cart-item:hover {
    transform: translateX(-2px);
    border-color: #3b82f6;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    background: #f1f5f9;
}

.cart-item-info { flex: 1; }

.cart-item-title {
    color: #0f172a;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.cart-item-price {
    color: #3b82f6;
    font-size: 12px;
    font-weight: 600;
}

.cart-item-qty {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.cart-item-qty button {
    background: #e2e8f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.cart-item-qty button:hover { background: #cbd5e1; transform: scale(1.05); }
.cart-item-qty button:last-child { background: #fee2e2; color: #dc2626; }
.cart-item-qty button:last-child:hover { background: #fecaca; }
.cart-item-qty span {
    min-width: 28px;
    text-align: center;
    color: #334155;
    font-weight: 500;
}

.cart-item-subtotal {
    font-weight: 600;
    color: #0f172a;
    font-size: 13px;
    min-width: 80px;
    text-align: right;
}

/* ========== VOUCHER INPUT CART ========== */
.voucher-input-cart {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.voucher-input-cart input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.voucher-input-cart input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }

.voucher-input-cart button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.voucher-input-cart button:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3); }

.voucher-message-cart {
    padding: 8px 16px;
    font-size: 12px;
    text-align: center;
}

.voucher-message-cart.success { background: #dcfce7; color: #16a34a; }
.voucher-message-cart.error { background: #fee2e2; color: #dc2626; }

.voucher-info {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.voucher-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #dcfce7;
    padding: 8px 12px;
    border-radius: 12px;
}

.voucher-applied span:first-child {
    color: #16a34a;
    font-weight: 600;
    font-size: 12px;
}

.voucher-applied span:nth-child(2) {
    color: #16a34a;
    font-size: 12px;
}

.voucher-applied button {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 14px;
}

.cart-total {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.total-row .total-label { color: #475569; font-weight: 500; }
.subtotal-amount, .discount-amount { color: #0f172a; font-weight: 600; }
.total-amount { color: #0f172a; font-size: 20px; font-weight: 700; }
.discount-amount { color: #16a34a; }

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    padding: 14px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    transition: all 0.2s;
}

.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3); }

.empty-cart {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-cart p { font-size: 13px; margin-bottom: 4px; }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========== FOOTER ========== */
.footer {
    background: #ffffff;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.footer-section p {
    color: #64748b;
    font-size: 13px;
    margin: 8px 0;
}

.footer-section i {
    width: 24px;
    color: #3b82f6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 12px;
}

.social-links a {
    color: #94a3b8;
    font-size: 18px;
    transition: all 0.2s;
}

.social-links a:hover { color: #3b82f6; transform: translateY(-3px); }

.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 11px;
}

/* ========== FOOTER LINKS (BARU) ========== */
.footer-links {
    margin-top: 12px;
    font-size: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #3b82f6;
}

/* ========== NOTIFICATION TOAST ========== */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 500;
    z-index: 1002;
    animation: slideIn 0.3s ease;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.notification.error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.notification.warning { background: linear-gradient(135deg, #f59e0b, #d97706); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    text-align: center;
    padding: 60px;
    color: #94a3b8;
}

.loading-spinner i {
    font-size: 40px;
    color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== POPUP MODAL ========== */
.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 28px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    padding: 28px 24px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: popupZoom 0.3s ease;
}

@keyframes popupZoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-close:hover { background: #ef4444; color: white; }

.popup-media {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 50%;
}

.popup-media i { font-size: 40px; color: #3b82f6; }
.popup-media img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.popup-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.popup-content p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 20px;
}

.popup-voucher {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.voucher-code {
    font-size: 20px;
    font-weight: 800;
    color: #d97706;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.copy-voucher-btn {
    background: #d97706;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-voucher-btn:hover { background: #b45309; transform: scale(1.02); }

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.popup-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

.popup-btn-secondary {
    background: linear-gradient(135deg, #f59e0b, #e67e22);
}

.popup-btn-secondary:hover {
    background: linear-gradient(135deg, #e67e22, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ========== MUSIC MODAL & PLAYER ========== */
.music-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.music-modal-content {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: popupZoom 0.3s ease;
}

.music-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.music-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover { background: #ef4444; color: white; }

.music-modal-body { padding: 20px; }

.music-now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 20px;
}

.music-now-playing img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.music-info { flex: 1; }
.music-title { font-weight: 600; font-size: 13px; color: #0f172a; }
.music-artist { color: #64748b; font-size: 11px; }
.music-stop-btn {
    background: #fee2e2;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
}

.music-stop-btn:hover { transform: scale(1.05); background: #fecaca; }

.music-progress { margin-bottom: 20px; }
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}
.progress-filled {
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.1s linear;
}
.music-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 6px;
}
.music-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.music-control-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.music-control-btn:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.music-volume {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}
.volume-btn {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.volume-btn:hover { background: #3b82f6; color: white; }
.music-volume input { flex: 1; max-width: 150px; }
.music-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.music-search input {
    flex: 1;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 13px;
    transition: all 0.2s;
}
.music-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
.music-search button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 0 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.music-search button:hover { transform: translateY(-1px); }
.music-results { margin-bottom: 20px; }
.results-title {
    color: #64748b;
    font-size: 11px;
    margin-bottom: 10px;
}
.results-list {
    max-height: 250px;
    overflow-y: auto;
}
.result-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.result-item:hover { background: #eef2ff; transform: translateX(4px); }
.result-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}
.result-info { flex: 1; }
.result-title {
    font-weight: 600;
    font-size: 12px;
    color: #0f172a;
}
.result-artist {
    color: #64748b;
    font-size: 10px;
}
.result-duration {
    color: #3b82f6;
    font-size: 10px;
    margin-top: 2px;
}
.empty-message {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-size: 12px;
}
.loading-indicator {
    text-align: center;
    padding: 30px;
    color: #3b82f6;
}
.music-history {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}
.history-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 10px;
}
.clear-history {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.clear-history:hover { transform: scale(1.05); }
.history-list {
    max-height: 150px;
    overflow-y: auto;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.history-item:hover { background: #eef2ff; transform: translateX(4px); }
.history-item img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
}
.history-item-info { flex: 1; }
.history-item-title {
    font-size: 11px;
    font-weight: 500;
    color: #0f172a;
}
.history-item-artist {
    font-size: 9px;
    color: #64748b;
}

/* ========== MINI FLOATING PLAYER ========== */
.floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: #ffffff;
    border-radius: 60px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    cursor: move;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, transform 0.2s;
}

.floating-player:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

.floating-player-content {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
}

.floating-player-content img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
}

.floating-info {
    flex: 1;
    min-width: 0;
}

.floating-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-artist {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-controls {
    display: flex;
    gap: 8px;
}

.floating-controls button {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-controls button:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.floating-drag {
    cursor: grab;
    color: #94a3b8;
    font-size: 14px;
    padding: 0 5px;
}

.floating-drag:active {
    cursor: grabbing;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title { font-size: 24px; }
    .cart-sidebar { width: 100%; right: -100%; }
    .section-title { font-size: 18px; margin-top: 20px; }
    .container { padding: 20px 16px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }
    .slider-section { padding: 0 12px; }
    .swiper-button-next, .swiper-button-prev { display: none; }
    .popup-content { max-width: 300px; padding: 20px 16px; }
    .popup-media { width: 60px; height: 60px; }
    .popup-media i { font-size: 30px; }
    .popup-content h2 { font-size: 18px; }
    .voucher-input-cart { flex-direction: column; }
    .voucher-input-cart button { width: 100%; }
    .sidebar { width: 260px; left: -260px; }
    .top-navbar { display: flex; }
    
    /* Sidebar responsive */
    .sidebar-link {
        padding: 10px 16px;
        font-size: 13px;
        margin: 2px 6px;
    }
    .sidebar-section-title {
        padding: 10px 16px 6px 16px;
        font-size: 10px;
    }
}

@media (min-width: 769px) {
    .menu-toggle { display: none; }
    .top-navbar { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
    .popup-buttons { gap: 10px; }
    .popup-btn { padding: 10px 16px; font-size: 13px; }
    .floating-player { width: 260px; right: 10px; bottom: 10px; }
    .floating-title { font-size: 11px; }
    .floating-artist { font-size: 9px; }
    .floating-controls button { width: 28px; height: 28px; }
    .product-title { font-size: 12px; }
    .product-price { font-size: 14px; }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-primary { color: #3b82f6; }
.text-success { color: #22c55e; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.bg-primary { background: #3b82f6; }
.bg-success { background: #22c55e; }
.bg-warning { background: #f59e0b; }
.bg-danger { background: #ef4444; }

/* ========== ANIMATIONS ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-pulse { animation: pulse 0.5s ease-in-out; }
.animate-shake { animation: shake 0.3s ease-in-out; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========== SELECTION ========== */
::selection {
    background: #3b82f6;
    color: white;
}