/* SimaCollection - Main Stylesheet */

:root {
    --primary-color: #b8860b;
    --primary-dark: #8b6914;
    --primary-light: #d4a526;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #25d366;
    --bg-light: #f8f9fa;
    --bg-cream: #faf8f5;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --font-primary: 'Poppins', 'Noto Sans Arabic', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Brand */
.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #22c55e;
    border-color: #22c55e;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 1050;
    box-shadow: var(--shadow-lg);
    animation: pulse 2s infinite;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background: #22c55e;
    color: white;
    transform: scale(1.1);
}

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

/* Top Bar */
.top-bar {
    font-size: 0.875rem;
}

/* Header */
.main-header {
    border-bottom: 1px solid var(--border-color);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #fff 100%);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 0.1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Category Cards */
.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 200px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.category-card .overlay h5 {
    margin: 0;
    font-weight: 600;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: white;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.badge-sale {
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-actions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    gap: 10px;
}

.product-card:hover .product-actions {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.product-info {
    padding: 1.25rem;
}

.product-info h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.product-price .old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Features Section */
.feature-box {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.75rem;
}

/* WhatsApp Reviews Slider */
.whatsapp-slider-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 4rem 0;
}

.whatsapp-media-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
    margin: 10px;
}

.whatsapp-media-card img,
.whatsapp-media-card video {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.whatsapp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Cart Page */
.cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.quantity-control button {
    border: none;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-control button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-control input {
    border: none;
    width: 50px;
    text-align: center;
    font-weight: 600;
}

/* Checkout */
.checkout-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.bank-info {
    background: var(--bg-cream);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.advance-amount {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.advance-amount .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Order Confirmation */
.order-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #86efac, #22c55e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 3rem;
}

/* Product Detail Page */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image {
    border-radius: 15px;
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 1rem;
}

.main-image img {
    width: 100%;
    height: auto;
}

.thumbnail-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--primary-color);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1rem;
    margin: 0 3px;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(184, 134, 11, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background: var(--bg-cream);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Swiper Custom */
.swiper-button-next,
.swiper-button-prev {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1rem;
    color: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 1rem 0;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* Alerts */
.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: none;
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: none;
    color: #991b1b;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 5rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-section {
        min-height: 400px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .cart-item {
        text-align: center;
    }
    
    .cart-item-image {
        margin: 0 auto 1rem;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    .top-bar,
    .main-header,
    footer {
        display: none !important;
    }
}

/* Footer Styles */
footer {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 3rem 0 1rem;
}

footer h5,
footer h6 {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer p {
    color: #cccccc;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer ul li a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
}

footer ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

footer .text-muted {
    color: #999999 !important;
}

footer hr {
    border-color: #333;
}

footer .brand-text {
    -webkit-text-fill-color: var(--primary-color);
}

/* Add this to your style.css file - Product Image Hover Rotation */

/* Multiple images in product card */
.product-image .product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image .product-img.active {
    opacity: 1;
}

.product-image-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==============================================
   COLOR SWATCHES & SIZE OPTIONS
   Add this to your style.css file
   ============================================== */

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch-wrapper {
    position: relative;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.color-radio:checked + .color-swatch {
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: scale(1.1);
}

.color-radio:checked + .color-swatch::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* For light colors, show dark checkmark */
.color-swatch[style*="#fff"], 
.color-swatch[style*="#FFF"],
.color-swatch[style*="white"],
.color-swatch[style*="#f"], 
.color-swatch[style*="#e"],
.color-swatch[style*="#d"],
.color-swatch[style*="#c"] {
    border-color: #eee;
}

.color-radio:checked + .color-swatch[style*="#fff"]::after,
.color-radio:checked + .color-swatch[style*="#FFF"]::after,
.color-radio:checked + .color-swatch[style*="white"]::after {
    color: #333;
    text-shadow: none;
}

/* Unavailable color */
.color-swatch.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.color-swatch.unavailable .unavailable-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #dc3545;
    transform: rotate(-45deg);
    top: 50%;
    left: 0;
}

/* Size Options */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option-wrapper {
    position: relative;
}

.size-option {
    min-width: 50px;
    height: 40px;
    padding: 0 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.size-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-cream);
}

.size-radio:checked + .size-option {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

/* Unavailable size */
.size-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #f5f5f5;
}

.size-option.unavailable:hover {
    border-color: #ddd;
    background: #f5f5f5;
}

/* Small color dot for cart/checkout display */
.color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.color-dot-sm {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #ddd;
    vertical-align: middle;
    margin-right: 4px;
}

/* Admin Color Picker Styles */
.form-control-color {
    width: 50px;
    height: 38px;
    padding: 0.25rem;
    cursor: pointer;
}

.color-hex-text {
    font-family: monospace;
    text-transform: uppercase;
}

/* Color/Size rows in admin */
.color-row,
.size-row {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.color-row:hover,
.size-row:hover {
    background: #e9ecef;
}

/* Product card color indicators (optional - for listing pages) */
.product-colors-preview {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.product-colors-preview .color-dot-mini {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.product-colors-preview .more-colors {
    font-size: 10px;
    color: #666;
    line-height: 12px;
}

/* RTL Support */
[dir="rtl"] .color-swatches,
[dir="rtl"] .size-options {
    flex-direction: row-reverse;
}

[dir="rtl"] .color-dot-sm {
    margin-right: 0;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 576px) {
    .color-swatch {
        width: 35px;
        height: 35px;
    }
    
    .size-option {
        min-width: 45px;
        height: 36px;
        padding: 0 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   MOBILE HEADER - Add to style.css
   ============================================ */

/* Mobile cart button */
.mobile-cart-btn {
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
}

.mobile-cart-btn .badge {
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
}

/* Mobile language button */
.mobile-lang-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 42px;
}

/* Ensure proper spacing on mobile header */
@media (max-width: 991.98px) {
    .navbar {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .mobile-cart-btn {
        padding: 0.4rem 0.6rem;
    }
    
    .mobile-lang-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* RTL adjustments */
[dir="rtl"] .mobile-cart-btn .badge {
    right: auto;
    left: 0;
    transform: translate(-50%, -50%);
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}