/* Main Styles for Nidam-IE-Com - Green-Blue Theme */

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

:root {
    /* Eco-friendly calmer theme */
    --primary: #5f9d7a;
    --primary-dark: #4d8466;
    --primary-light: #7db191;
    --secondary: #7a9d8a;
    --secondary-dark: #688575;
    --accent: #8aa97f;
    --success: #5aa36a;
    --danger: #d05b5b;
    --warning: #c79a42;
    --light: #f5f7f2;
    --dark: #294237;
    --border: #d8e0d5;
    --surface: #fcfcf8;
    --surface-soft: #f2f5ee;
    --bg-gradient: linear-gradient(135deg, #5f9d7a 0%, #7a9d8a 100%);
    --text-dark: #26332c;
    --text-light: #66756c;
    
    /* Softer shadows */
    --shadow-sm: 0 1px 2px rgba(41, 66, 55, 0.04);
    --shadow: 0 4px 10px rgba(41, 66, 55, 0.06);
    --shadow-lg: 0 10px 24px rgba(41, 66, 55, 0.08);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: radial-gradient(circle at top, rgba(125, 177, 145, 0.10), transparent 24%), var(--surface-soft);
}

.price-line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.price-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

.price-currency {
    direction: rtl;
    unicode-bidi: isolate;
    display: inline-block;
    font-weight: 700;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

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

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

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--bg-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.125rem;
}

/* Header */
.site-header {
    background: rgba(252, 252, 248, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

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

.logo img {
    height: 50px;
    width: auto;
}

.logo h1 a {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover { color: var(--primary); }

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-gradient);
    transition: width 0.2s ease;
}

.main-nav a:hover::after { width: 100%; }

/* Hero Section */
.hero {
    background: linear-gradient(180deg, rgba(252, 252, 248, 0.98) 0%, rgba(242, 245, 238, 0.98) 100%);
    color: var(--text-dark);
    padding: 64px 0 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(95,157,122,0.06), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--text-light);
    opacity: 1;
}

.hero .btn-primary {
    background: var(--bg-gradient);
    color: #fff;
}

.hero .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
}

.classic-home {
    overflow-x: clip;
}

.hero-classic-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: stretch;
}

.hero-content-classic,
.hero-classic-panel {
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.hero-content-classic {
    padding: 34px;
    text-align: right;
}

.hero-classic-panel {
    padding: 28px;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(95,157,122,0.12);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-points {
    list-style: none;
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
}

.hero-points li {
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dark);
}

.classic-strip-wrap {
    margin-bottom: 32px;
}

.classic-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.classic-strip-item {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 16px;
    text-align: center;
}

.classic-strip-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--dark);
}

.classic-strip-item span {
    color: var(--text-light);
    font-size: 0.95rem;
}

.home-section {
    margin-bottom: 42px;
}

.section-heading-classic {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section-heading-classic h2 {
    margin-bottom: 0;
}

.section-link {
    font-weight: 700;
}

.features-classic {
    background: transparent;
    padding-top: 10px;
    padding-bottom: 60px;
}

.features-classic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.features-classic .feature-item {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 26px 20px;
}

/* Page shells */
.page-shell {
    padding-top: 26px;
    padding-bottom: 36px;
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 28px;
    border-radius: var(--radius-xl);
}

.page-intro-soft {
    background: linear-gradient(180deg, rgba(252,252,248,0.95), rgba(242,245,238,0.98));
    border: 1px solid rgba(216,224,213,0.9);
    box-shadow: var(--shadow-sm);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(95,157,122,0.12);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.page-intro p {
    max-width: 700px;
    margin-bottom: 0;
}

.category-hero-card {
    align-items: flex-end;
}

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

.category-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(95,157,122,0.12);
    color: var(--primary-dark);
    font-weight: 700;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.92rem;
}

/* Section Title */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

/* Product/category filters */
.filters-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin: 20px 0 30px;
    border: 1px solid var(--border);
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filters-header h3 {
    margin-bottom: 0;
}

.filters-hint {
    color: var(--text-light);
    font-size: 0.9rem;
}

.category-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-chip:hover {
    background: #ccfbf1;
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.category-chip.active {
    background: var(--bg-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.category-chip-icon {
    font-size: 1rem;
    line-height: 1;
}

.product-category-badge-wrap {
    margin-bottom: 14px;
}

.product-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(13,148,136,0.12), rgba(8,145,178,0.12));
    color: var(--primary-dark);
    border: 1px solid rgba(13,148,136,0.18);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.product-category-badge:hover {
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(13,148,136,0.18), rgba(8,145,178,0.18));
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

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

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 700;
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 700;
}

.bestseller-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--warning);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 700;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-info h3 a {
    color: var(--text-dark);
}

.product-info h3 a:hover { color: var(--primary); }

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.product-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.95rem;
    margin-left: 8px;
}

.product-category {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.product-stock {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.in-stock { color: var(--success); }
.out-of-stock { color: var(--danger); }
.low-stock { color: var(--warning); }

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1rem;
}

.category-card h3 a {
    color: var(--text-dark);
}

.category-card h3 a:hover { color: var(--primary); }

.categories-grid-polished {
    gap: 24px;
}

.category-card-polished {
    display: block;
    text-decoration: none;
    border: 1px solid rgba(13, 148, 136, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
}

.category-card-polished .category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, rgba(13,148,136,0.14), rgba(8,145,178,0.16));
}

.category-card-polished h3 {
    margin-bottom: 6px;
}

.category-card-polished p {
    margin: 0;
    font-size: 0.92rem;
}

/* Features */
.features {
    background: #f8fafc;
    padding: 80px 0;
    margin-top: 60px;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.feature-item p {
    font-size: 0.95rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: #ccc; }

/* Product Detail */
.product-gallery-main {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.product-gallery-main img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border-radius: 14px;
    background: #f8fafc;
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.product-thumb {
    border: 2px solid #dbe4ea;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-thumb.active,
.product-thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

.product-thumb img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-xl);
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.product-info-detail h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.product-rating .stars {
    color: var(--warning);
}

.product-price-detail {
    margin-bottom: 20px;
}

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

.original-price {
    color: #999;
    text-decoration: line-through;
    margin-left: 15px;
    font-size: 1.2rem;
}

.product-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.product-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.product-meta h2 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.product-summary {
    background: rgba(13, 148, 136, 0.08);
    padding: 15px 18px;
    border-radius: var(--radius-md);
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.product-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px 20px;
}

.product-detail-item dt {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.product-detail-item dd {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    text-align: right;
}

.cart-item-image-wrap {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--light);
}

.cart-item-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 72px;
    max-height: 72px;
    object-fit: cover;
}

.cart-item .item-details {
    min-width: 0;
}

.cart-item .item-details strong {
    display: block;
    overflow-wrap: anywhere;
}

.cart-item .item-details small {
    color: #6b7280;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    direction: ltr;
    white-space: nowrap;
}

.cart-quantity-input {
    width: 76px;
    height: 38px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--dark);
    text-align: center;
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.cart-quantity-input:focus {
    border-color: var(--primary);
    outline: 2px solid rgba(13, 148, 136, 0.18);
    outline-offset: 1px;
}

.cart-quantity-input:disabled {
    opacity: 0.55;
    cursor: wait;
}

.cart-item-error {
    display: block;
    min-height: 1.2em;
    margin-top: 5px;
    color: var(--danger);
    font-size: 0.78rem;
}

.cart-remove-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-table th, .cart-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.cart-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.cart-table td {
    vertical-align: middle;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
}

.quantity-input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.remove-btn {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.remove-btn:hover { background: #dc2626; }

.cart-summary {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 2px solid var(--border);
    margin-top: 10px;
    padding-top: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--radius-lg);
}

/* Checkout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.checkout-section {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.checkout-section h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
    color: var(--dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.required {
    color: var(--danger);
}

.order-summary {
    width: 100%;
    margin-bottom: 20px;
}

.order-summary th, .order-summary td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.order-summary th {
    background: var(--light);
    font-weight: 600;
}

.order-total {
    text-align: right;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    padding: 20px 0;
    border-top: 2px solid var(--border);
}

.payment-method {
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

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

.payment-method input[type="radio"] {
    margin-right: 10px;
    width: auto;
}

.payment-method strong {
    display: block;
    margin-bottom: 5px;
}

.payment-method small {
    color: var(--text-light);
}

/* Admin Styles */
.admin {
    background: #f1f5f9;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #fff;
    padding: 20px;
    box-shadow: var(--shadow);
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 5px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.admin-sidebar a:hover {
    background: var(--light);
    color: var(--primary);
}

.admin-sidebar a.active {
    background: var(--bg-gradient);
    color: #fff;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}

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

.admin-table {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.admin-table td {
    vertical-align: middle;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-processing { background: #e0e7ff; color: #3730a3; }
.status-shipped { background: #fae8ff; color: #86198f; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: #f3f4f6; color: #4b5563; }
.status-featured { background: #fef3c7; color: #92400e; }
.status-normal { background: #f3f4f6; color: #4b5563; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--bg-gradient);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-card .change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-card .change.positive { color: var(--success); }
.stat-card .change.negative { color: var(--danger); }

.no-results {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: var(--radius-lg);
}

/* Alerts */
.alerts { margin-bottom: 20px; }

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

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger, .alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Footer */
.site-footer {
    background: var(--dark);
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 10px; }
.footer-section a { color: rgba(255,255,255,0.7); }
.footer-section a:hover { color: var(--primary-light); }

.footer-section p { color: rgba(255,255,255,0.7); margin-bottom: 8px; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
}

/* Charts placeholder */
.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background: var(--light);
    border-radius: var(--radius);
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .main-nav a::after {
    left: auto;
    right: 0;
}

.rtl .discount-badge {
    right: auto;
    left: 10px;
}

.rtl .new-badge,
.rtl .bestseller-badge {
    left: auto;
    right: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery-main img {
        max-height: 360px;
    }
}

@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-intro,
    .category-hero-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .category-hero-meta {
        justify-content: space-between;
    }

    .hero-classic-grid,
    .classic-strip,
    .features-classic-grid {
        grid-template-columns: 1fr;
    }

    .hero-content-classic,
    .hero-classic-panel {
        padding: 22px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-heading-classic {
        align-items: stretch;
    }

    .hero-actions {
        flex-direction: column;
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.1rem; }
    
    .section-title {
        margin: 40px 0 30px;
        font-size: 1.6rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header-content { 
        flex-direction: row;
        align-items: center;
    }
    
    .logo img {
        height: 35px;
    }
    
    .hero {
        padding: 40px 15px;
        text-align: center;
    }
    
    .hero h1 { 
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero p { 
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .hero .btn-primary {
        width: 100%;
        padding: 12px 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .filters-card {
        padding: 16px;
    }

    .category-chip-grid {
        gap: 10px;
    }

    .category-chip {
        width: 100%;
        justify-content: center;
    }
    
    .category-card {
        padding: 15px;
    }
    
    .category-card h3 {
        font-size: 0.95rem;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 15px;
        position: relative;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .product-form {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .cart-table {
        display: block;
        overflow-x: auto;
    }
    
    .order-summary {
        padding: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.15rem; }
    
    .section-title {
        margin: 30px 0 20px;
        font-size: 1.4rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hero {
        padding: 50px 15px;
        margin-bottom: 30px;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .product-card {
        padding: 10px;
    }
    
    .product-card h3 {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .btn-small {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
