/**
 * SummerCave Store - Core Stylesheet
 * High-End Dark-Theme Glassmorphism UI with RTL/LTR Logical Properties
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #090a0f;
    --bg-deep: #050608;
    --card-bg: rgba(18, 22, 33, 0.65);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-hover-border: rgba(102, 252, 241, 0.4);
    
    --primary: #66fcf1;
    --primary-glow: rgba(102, 252, 241, 0.35);
    --secondary: #45a29e;
    --text-white: #ffffff;
    --text-muted: #a3a8b4;
    --text-dim: #707584;
    
    --success: #00e676;
    --danger: #ff4d4d;
    --warning: #ffb300;
    
    /* Layout Tokens */
    --max-width: 1280px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

body.theme-light {
    --bg-dark: #f4f6fa;
    --bg-deep: #e9ecf2;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover-border: rgba(0, 168, 150, 0.4);
    
    --primary: #00a896;
    --primary-glow: rgba(0, 168, 150, 0.15);
    --secondary: #028090;
    --text-white: #1a1e26;
    --text-muted: #5e6675;
    --text-dim: #8893a6;
    
    --success: #2ec4b6;
    --danger: #e63946;
    --warning: #ffb703;
}

body.theme-light::before {
    background-color: var(--primary);
    opacity: 0.08;
}
body.theme-light::after {
    background-color: var(--secondary);
    opacity: 0.08;
}

body.theme-light .form-control,
body.theme-light .form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-white);
}

body.theme-light .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300a896'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

body.theme-light .admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-inline-end: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .admin-topbar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .nav-link:hover,
body.theme-light .tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.theme-light .nav-link.active,
body.theme-light .tab-btn.active {
    background: rgba(0, 168, 150, 0.06);
}

body.theme-light .payment-card {
    background: rgba(255, 255, 255, 0.8);
}

body.theme-light .payment-card.active {
    background: rgba(0, 168, 150, 0.08);
}

body.theme-light .qty-selector {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .qty-btn {
    color: var(--text-white);
}

body.theme-light .qty-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.theme-light .cart-drawer {
    background: rgba(255, 255, 255, 0.97);
    border-inline-start: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .cart-drawer-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.8);
}

body.theme-light .cart-drawer-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.8);
}

body.theme-light .cart-drawer-overlay {
    background: rgba(0, 0, 0, 0.35);
}

body.theme-light .site-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-light .site-header.scrolled {
    background: rgba(255, 255, 255, 0.92);
}

body.theme-light .action-btn {
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.theme-light .action-btn:hover {
    background-color: rgba(0, 168, 150, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

body.theme-light .lang-switch {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}

body.theme-light .btn-secondary {
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-white);
}

body.theme-light .btn-secondary:hover {
    border-color: var(--primary);
    background-color: rgba(0, 168, 150, 0.06);
}

body.theme-light .btn-primary {
    box-shadow: 0 4px 15px rgba(0, 168, 150, 0.25);
}

body.theme-light .glass-panel {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.07);
}

body.theme-light .glass-panel:hover {
    border-color: rgba(0, 168, 150, 0.25);
}

body.theme-light .summary-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .summary-title {
    border-bottom-color: rgba(0, 0, 0, 0.07);
}

body.theme-light .summary-row {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.theme-light .hero-card {
    background: linear-gradient(135deg, rgba(0, 168, 150, 0.07) 0%, rgba(255, 255, 255, 0.6) 100%);
}

body.theme-light .product-card:hover {
    border-color: rgba(0, 168, 150, 0.3);
    box-shadow: 0 10px 30px rgba(0, 168, 150, 0.1);
}

body.theme-light .hero-title {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

body.theme-light .site-footer {
    background: rgba(230, 234, 242, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

body.theme-light .footer-logo,
body.theme-light .footer-title {
    color: var(--text-white);
}

body.theme-light .footer-links a {
    color: var(--text-muted);
}

body.theme-light .footer-links a:hover {
    color: var(--primary);
}

body.theme-light .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.07);
}

body.theme-light .social-link {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}

body.theme-light .social-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

body.theme-light .alert.alert-success {
    background: rgba(46, 196, 182, 0.12);
    border-color: rgba(46, 196, 182, 0.3);
    color: #028075;
}

body.theme-light .alert.alert-error {
    background: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.25);
    color: #c1121f;
}

body.theme-light .nav-badge {
    background: var(--danger);
    color: white;
}

body.theme-light .floating-whatsapp-btn {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

body.theme-light ::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

body.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

body.theme-light ::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

body.theme-light .drawer-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
    color: var(--text-dim);
}

body.theme-light .toast {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-white);
}

/* Base Configuration & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-ar);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body.lang-en {
    font-family: var(--font-en);
}

/* Ambient glow blobs in background */
body::before, body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}
body::before {
    top: 15%;
    left: 10%;
    background-color: var(--primary);
}
body::after {
    bottom: 20%;
    right: 10%;
    background-color: var(--secondary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    background: none;
    border: none;
    outline: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Layout Utilities & Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* Glassmorphism Panel Class */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-deep);
    box-shadow: 0 4px 15px rgba(102, 252, 241, 0.2);
}
.btn-primary:hover {
    background-color: var(--text-white);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-white);
}
.btn-secondary:hover {
    border-color: var(--primary);
    background-color: rgba(102, 252, 241, 0.05);
    color: var(--primary);
}

.btn-danger {
    background-color: rgba(255, 77, 77, 0.15);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: var(--danger);
}
.btn-danger:hover {
    background-color: var(--danger);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Header / Navigation styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--card-border);
}

.site-header.scrolled {
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 10px 0;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
}
.logo-link:hover {
    color: var(--primary);
    text-shadow: var(--shadow-glow);
}

.logo-dot {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition);
}
.action-btn:hover {
    background-color: rgba(102, 252, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary);
    color: var(--bg-deep);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-switch {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lang-switch:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 60px 0;
    position: relative;
}

.hero-card {
    padding: 60px;
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 50%;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(102, 252, 241, 0.1);
    color: var(--primary);
    font-weight: 700;
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.hero-images-container {
    position: absolute;
    inset-inline-end: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-glow-back {
    position: absolute;
    width: 300px;
    height: 300px;
    background-color: var(--primary);
    opacity: 0.3;
    filter: blur(80px);
    border-radius: 50%;
}

.hero-float-img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    animation: float 4s ease-in-out infinite;
    z-index: 2;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Category Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding: 15px 25px;
}

.category-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-tag {
    padding: 8px 18px;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.category-tag:hover, .category-tag.active {
    background-color: var(--primary);
    color: var(--bg-deep);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 252, 241, 0.15);
}

.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 5px 5px 5px 15px;
    width: 320px;
}

body.lang-en .search-box {
    padding: 5px 15px 5px 5px;
}

.search-input {
    flex: 1;
    font-size: 0.9rem;
}

.search-btn-icon {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: var(--bg-deep);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-btn-icon:hover {
    opacity: 0.9;
}

/* Products Section */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

body[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 10px 30px rgba(102, 252, 241, 0.08);
    transform: translateY(-8px);
}

.product-badge {
    position: absolute;
    top: 15px;
    inset-inline-start: 15px;
    z-index: 5;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}
.product-badge.sale {
    background-color: var(--danger);
    color: var(--text-white);
}
.product-badge.out {
    background-color: var(--text-dim);
    color: var(--text-white);
}

.product-img-wrapper {
    position: relative;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    padding-top: 100%; /* 1:1 Aspect ratio */
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.15);
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-white);
}
.product-name:hover {
    color: var(--primary);
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-size: 0.85rem;
    margin-bottom: 15px;
}
.rating-count {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-inline-start: 6px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 15px;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
}

.price-sale {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.price-original {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--text-dim);
}

/* Product Detail Page */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-main {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: rgba(0,0,0,0.2);
}

.gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--border-radius-lg);
}

.product-details {
    display: flex;
    flex-direction: column;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.product-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.detail-original-price {
    font-size: 1.3rem;
    text-decoration: line-through;
    color: var(--text-dim);
}

.detail-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 25px;
}

.actions-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.qty-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    height: 48px;
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
}
.qty-btn:hover {
    background-color: rgba(102, 252, 241, 0.1);
    color: var(--primary);
}

.qty-input {
    width: 50px;
    text-align: center;
    font-weight: 700;
    border-inline: 1px solid var(--card-border);
    font-size: 1.05rem;
}

/* Tabs System (Specifications, Reviews) */
.product-tabs {
    margin-top: 50px;
    margin-bottom: 50px;
}

.tabs-nav {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 25px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--card-border);
}

.spec-table td {
    padding: 15px 20px;
}

.spec-table td:first-child {
    font-weight: 700;
    color: var(--text-muted);
    width: 30%;
}

/* Reviews Box */
.review-item {
    padding: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reviewer-name {
    font-weight: 700;
}

.reviewer-date {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: -420px;
    width: 420px;
    height: 100%;
    background-color: var(--bg-dark);
    border-inline-start: 1px solid var(--card-border);
    box-shadow: -10px 0 35px rgba(0,0,0,0.7);
    z-index: 1001;
    transition: cubic-bezier(0.25, 0.8, 0.25, 1) 0.4s;
    display: flex;
    flex-direction: column;
}

body[dir="rtl"] .cart-drawer {
    box-shadow: 10px 0 35px rgba(0,0,0,0.7);
}

.cart-drawer.active {
    inset-inline-end: 0;
}

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-drawer-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-white);
}

.cart-drawer-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}
.cart-drawer-close:hover {
    color: var(--primary);
}

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

.drawer-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.drawer-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background-color: rgba(0,0,0,0.1);
}

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

.drawer-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-white);
}

.drawer-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.drawer-item-remove {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 0.85rem;
}
.drawer-item-remove:hover {
    color: var(--danger);
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--card-border);
    background-color: var(--bg-deep);
}

.drawer-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 700;
}

.drawer-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* Page Layouts (Cart, Checkout, Settings) */
.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 40px 0 20px 0;
}

.cart-table-wrapper {
    margin: 30px 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: start;
    padding: 15px;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-muted);
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.cart-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-product-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    background-color: rgba(0,0,0,0.1);
}

.cart-product-title {
    font-weight: 700;
}

.cart-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.summary-card {
    padding: 30px;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.summary-row.total {
    border-top: 1px solid var(--card-border);
    padding-top: 15px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    height: 48px;
    padding: 0 15px;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.15);
}

textarea.form-control {
    height: 120px;
    padding: 15px;
    resize: none;
}

.form-select {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    height: 48px;
    padding: 0 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2366fcf1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

body[dir="rtl"] .form-select {
    background-position: left 15px center;
}

/* Radio buttons payment methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.payment-method-item {
    display: block;
    cursor: pointer;
    position: relative;
    padding: 20px;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.payment-method-item:hover {
    border-color: var(--secondary);
}

.payment-method-item input[type="radio"] {
    display: none;
}

.payment-method-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-method-title::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    transition: var(--transition);
}

.payment-method-item input[type="radio"]:checked + .payment-method-title::before {
    border-color: var(--primary);
    background-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.payment-method-item input[type="radio"]:checked ~ .payment-method-desc {
    display: block;
}

.payment-method-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
    margin-inline-start: 28px;
    display: none;
}

/* Settings panel specific styles */
.settings-layout {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
}

.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--success);
}

.alert-error {
    background-color: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: var(--danger);
}

/* Footer styling */
.site-footer {
    border-top: 1px solid var(--card-border);
    background-color: var(--bg-deep);
    padding: 70px 0 30px 0;
    margin-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.social-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(102, 252, 241, 0.05);
}

.footer-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-white);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.footer-links a:hover {
    color: var(--primary);
    padding-inline-start: 4px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.payment-badges {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.6rem;
}

/* Order Confirmation Confirmation styles */
.confirmation-card {
    max-width: 600px;
    margin: 50px auto;
    padding: 50px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 230, 118, 0.12);
    border: 2px solid var(--success);
    color: var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    animation: scaleUp 0.5s ease;
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tracking-timeline {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: var(--card-border);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 3px solid var(--card-border);
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.timeline-step.active .step-node {
    border-color: var(--primary);
    background-color: var(--primary);
    color: var(--bg-deep);
    box-shadow: var(--shadow-glow);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.timeline-step.active .step-label {
    color: var(--primary);
}

.order-info-details {
    text-align: start;
    border-top: 1px solid var(--card-border);
    margin-top: 30px;
    padding-top: 25px;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    inset-inline-end: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-deep);
    border: 1px solid var(--card-hover-border);
    color: var(--text-white);
    padding: 15px 25px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: slideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero-card { padding: 30px; flex-direction: column; text-align: center; gap: 30px; }
    .hero-content { max-width: 100%; }
    .hero-images-container { position: relative; inset-inline-end: auto; top: auto; transform: none; width: 100%; height: 260px; }
    .hero-float-img { max-height: 240px; }
    .product-detail-wrapper { grid-template-columns: 1fr; gap: 30px; }
    .cart-grid-layout { grid-template-columns: 1fr; }
    .nav-menu { display: none; } /* Could add a mobile burger in production */
    .footer-grid { grid-template-columns: 1fr; }
    .site-header { padding: 10px 0; }
}

/* Card-based Payment Selection UI */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.payment-card {
    position: relative;
    border: 2px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.payment-card:hover {
    border-color: var(--primary-glow);
    background: rgba(102, 252, 241, 0.03);
}

.payment-card.active {
    border-color: var(--primary);
    background: rgba(102, 252, 241, 0.08);
    box-shadow: 0 0 15px var(--primary-glow);
}

.payment-card input[type="radio"] {
    display: none;
}

.payment-card-icon {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.payment-card.active .payment-card-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.payment-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
}

/* Floating WhatsApp Button for Product Page & Layout */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    inset-inline-start: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    cursor: pointer;
    animation: whatsappPulse 2s infinite;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Share/Query Button inside Product Detail column */
.whatsapp-query-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #25d366 !important;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: var(--transition);
}

.whatsapp-query-inline:hover {
    background: #25d366;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Confirmation Receipt styles */
.confirmation-card {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px 30px;
    text-align: center;
    border-radius: var(--border-radius-lg);
}

.success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(102, 252, 241, 0.1);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 20px auto;
    box-shadow: var(--shadow-glow);
    animation: successScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.whatsapp-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #25d366, #1cbd55);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: var(--border-radius-md);
    margin-top: 25px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.whatsapp-confirm-btn:hover {
    background: #ffffff;
    color: #128c7e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-confirm-btn i {
    font-size: 1.4rem;
    animation: iconShake 1.5s infinite;
}

@keyframes iconShake {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(5deg); }
}

.print-receipt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    color: var(--text-white);
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition);
}

.print-receipt-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-white);
}

/* Print Styles for invoice receipt */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .site-header, .site-footer, .btn, .print-receipt-btn, .whatsapp-confirm-btn, .success-icon, .tracking-timeline {
        display: none !important;
    }
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .glass-panel {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .order-info-details {
        border-top: 2px solid #000000 !important;
        color: #000000 !important;
    }
    .order-info-row span {
        color: #000000 !important;
    }
    .text-muted {
        color: #555555 !important;
    }
    .text-primary, .text-success, .text-danger {
        color: #000000 !important;
    }
}

/* Micro-interactions & Glow Effects */
.product-card, .deal-card, .category-card-item {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease !important;
}

.product-card:hover, .deal-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px rgba(102, 252, 241, 0.15) !important;
}

.category-card-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(102, 252, 241, 0.1) !important;
}

.feature-card {
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-glow);
    background: rgba(18, 22, 33, 0.85);
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 77, 77, 0.5)); }
    50% { transform: scale(1.1) rotate(5deg); filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.8)); }
}

/* Skeleton Loading / Shimmer Effect */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 20%,
        rgba(255, 255, 255, 0.07) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}


