/* Alkateb Shop Styles - Unified Design System */
/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Color Palette - Luxury Gold & Bronze */
    --color-bg: #ffffff;
    --color-text: #262223;
    --color-text-light: #555555;

    /* Accents */
    --color-accent: #B89358;
    /* Gold */
    --color-accent-hover: #8F703E;
    --color-secondary: #714F2A;
    /* Bronze */
    --color-light-gray: #fcfbf8;
    /* Warm off-white */
    --color-border: #e6e1d8;

    /* Functional */
    --color-danger: #dc3545;
    --color-success: #198754;
    --color-info: #0dcaf0;

    /* UI Elements */
    --shadow-card: 0 5px 30px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 20px rgba(184, 147, 88, 0.15);
    --border-radius: 12px;
}

html[dir="rtl"] body,
body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-light-gray);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(184, 147, 88, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(184, 147, 88, 0.05);
    transition: all 0.3s ease;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
}

.header .brand img {
    height: 40px;
    object-fit: contain;
}

.brand-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-text);
}

.brand-subtitle {
    opacity: 0.8;
    font-size: 0.85rem;
    color: var(--color-accent);
}

.header a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.header a:hover {
    color: var(--color-accent);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Sections */
.section {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.section-title {
    color: var(--color-text);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    /* Rounded buttons like main site */
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(184, 147, 88, 0.3);
}

.btn-secondary {
    background: var(--color-secondary);
    color: #fff;
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}

.btn-info {
    background: var(--color-info);
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 15px;
}

/* Cards (Carpet Grid) */
.carpet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 0;
    padding: 0;
}

.carpet-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.carpet-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(184, 147, 88, 0.2);
}

.carpet-card img {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
    background: #f9f9f9;
}

.carpet-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--color-text);
    text-align: center;
    line-height: 1.4;
    font-weight: 700;
}

/* Price Tags & Labels */
.price-tag {
    background: #fff9f0;
    /* Very light gold bg */
    color: var(--color-secondary);
    border: 1px solid rgba(184, 147, 88, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    text-align: center;
    margin: 5px 0 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Swatches & Chips */
.color-swatches {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.2s;
}

.color-swatch:hover,
.color-swatch.active {
    border-color: var(--color-accent);
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(184, 147, 88, 0.2);
}

.size-chips {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
    flex-wrap: wrap;
}

.size-chip {
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    background: #fff;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.size-chip:hover,
.size-chip.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* Details Page */
.details-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 40px;
    margin: 30px auto;
    max-width: 900px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    /* Prevent overflow */
}

.main-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    /* Prevent excessive height */
    object-fit: cover;
    /* Crop to fit frame neatly */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto 20px;
    transition: opacity 0.3s ease-in-out;
    /* Smooth fade transition */
}

.desc {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

#variant_img {
    display: none;
}

/* Hide color dropdown, use swatches only */
.color-select {
    display: none !important;
}

/* Price Styling */
.price {
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-accent);
    margin: 20px 0;
}

/* Footer */
.footer {
    text-align: center;
    background: var(--color-accent);
    /* Gold Footer */
    color: #fff;
    padding: 30px 0;
    margin-top: 50px;
}

/* Forms */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(184, 147, 88, 0.1);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}