/* =====================================================
   PHARMACY STORE - COMPLETE STYLESHEET
   Brand: Red / Green / Charcoal / White
===================================================== */

/* =========================
   1. Global Styles
========================= */

:root {
    --primary: #ED151C;
    --primary-dark: #B90F16;
    --accent: #08B747;
    --dark: #111820;
    --dark-light: #202B35;
    --muted: #68737D;
    --surface: #FFFFFF;
    --background: #F4F6F7;
    --border: #E2E6E9;

    --brand-red: #ED151C;
    --brand-green: #08B747;
    --brand-dark: #111820;
    --brand-white: #FFFFFF;

    --shadow: 0 8px 25px rgba(17, 24, 32, 0.08);
    --shadow-hover: 0 15px 35px rgba(17, 24, 32, 0.13);

    --radius: 15px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background);
    color: var(--dark);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

a {
    transition: var(--transition);
}

/* =========================
   2. General Header
========================= */

header {
    background-color: var(--brand-dark);
    color: white;
    text-align: center;
    padding: 25px 20px;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

header nav a:hover {
    color: var(--brand-red);
}

header nav button {
    padding: 9px 15px;
    border: none;
    border-radius: 7px;
    background-color: white;
    color: var(--primary);
    font-weight: bold;
}

header nav button:hover {
    background-color: #FCEEEF;
}

/* =========================
   3. Shared Product Sections
========================= */

.products-section {
    padding: 40px 7%;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--primary-dark);
}

#products-container,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.product-card {
    background: white;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
}

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

.product-card h3 {
    color: var(--dark);
    font-size: 18px;
    margin-bottom: 8px;
}

.product-card p {
    margin: 6px 0;
    color: #54616C;
    font-size: 13px;
    line-height: 1.6;
}

.product-image {
    width: 100%;
    height: 165px;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-card button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    transition: var(--transition);
}

.product-card button:hover {
    background: var(--primary-dark);
}

/* =========================
   4. Products Page
========================= */

.products-page {
    max-width: 1250px;
    margin: 45px auto;
    padding: 20px 30px;
    position: relative;
    z-index: 1;
}

.products-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 35px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.products-header .section-label {
    display: inline-block;
    padding: 7px 15px;
    background: rgba(237, 21, 28, 0.08);
    color: var(--primary);
    border-radius: 30px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.products-header h2 {
    font-size: 40px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.products-header p {
    color: #52616D;
    font-size: 16px;
    line-height: 1.8;
}

.products-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    padding: 22px;
    margin-bottom: 35px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.products-controls input,
.products-controls select {
    width: 100%;
    min-width: 0;
    padding: 15px;
    border: 1px solid #D8E0E5;
    border-radius: 13px;
    background: white;
    color: var(--dark);
    font-size: 15px;
    transition: var(--transition);
}

.products-controls input:focus,
.products-controls select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(237, 21, 28, 0.10);
}

/* =========================
   5. Product Details Page
========================= */

.product-details-page {
    max-width: 1200px;
    min-height: 70vh;
    margin: 40px auto;
    padding: 40px 25px;
    background: linear-gradient(135deg, #F4F6F7, #FFFFFF);
    border-radius: 20px;
}

#product-details-container {
    display: flex;
    align-items: center;
    gap: 45px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px;
    background: white;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

#product-details-container.product-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 55px;
    padding: 45px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 25px;
    box-shadow: 0 15px 45px rgba(17, 24, 32, 0.09);
    overflow: hidden;
    animation: detailsFadeIn 0.6s ease both;
}

.product-details-image-wrapper {
    min-width: 0;
    min-height: 390px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #F5F7F8;
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
}

.product-details-image {
    display: block;
    width: 48%;
    height: 420px;
    object-fit: contain;
    padding: 10px;
    background: #F5F7F8;
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: transform 0.4s ease;
}

.product-details-image-wrapper .product-details-image {
    width: 100%;
    height: 330px;
    border: none;
    padding: 0;
}

.product-details-image:hover,
.product-details-image-wrapper:hover .product-details-image {
    transform: scale(1.04);
}

.product-details-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.product-details-info h2,
.product-details-info .product-details-title {
    color: var(--dark);
    font-size: 30px;
    margin: 0 0 10px;
}

.product-details-description,
.product-details-info p {
    color: #64717C;
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
}

.product-details-category {
    display: inline-block;
    padding: 7px 15px;
    background: rgba(237, 21, 28, 0.08);
    color: var(--primary);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
}

.product-details-price,
.product-details-info .product-details-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 5px 0;
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.product-details-old-price {
    color: #94A3B8;
    font-size: 16px;
    font-weight: 500;
    text-decoration: line-through;
}

.product-details-new-price {
    color: var(--primary);
    font-size: 27px;
    font-weight: 800;
}

.product-details-discount {
    display: inline-block;
    padding: 6px 12px;
    background: #FFF0F0;
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.product-details-info .product-details-stock {
    margin: 0;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}

.product-details-stock.in-stock {
    background: rgba(8, 183, 71, 0.10);
    color: #078C38;
}

.product-details-stock.out-of-stock {
    background: #FFF0F0;
    color: #D32F2F;
}

.product-details-info .product-details-cart-btn,
.product-details-info button {
    width: 100%;
    max-width: 320px;
    padding: 15px 25px;
    margin-top: 10px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(237, 21, 28, 0.20);
    transition: var(--transition);
}

.product-details-info .product-details-cart-btn:hover:not(:disabled),
.product-details-info button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.product-details-info .product-details-cart-btn:disabled {
    background: #AAB6C5;
    box-shadow: none;
    cursor: not-allowed;
}

.product-details-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 5%;
    background: var(--brand-dark);
    color: white;
}

.product-details-page-header h1 {
    color: white;
    font-size: 26px;
}

.product-details-page-header nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.product-details-page-header nav a {
    color: #E1E5E8;
    text-decoration: none;
    font-weight: 600;
}

.product-details-page-header nav a:hover {
    color: var(--primary);
}

.product-details-page-header .language-switcher button {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.product-details-page-header .language-switcher button:hover {
    background: var(--primary);
    color: white;
}

@keyframes detailsFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   6. Order Details Page
========================= */

.order-details-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 25px;
}

.order-header {
    background: rgba(237, 21, 28, 0.07);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.order-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.order-info,
.order-products {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.order-info p {
    margin: 12px 0;
    color: #444;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #EEE;
}

.order-total {
    background: rgba(237, 21, 28, 0.07);
    padding: 20px;
    border-radius: 12px;
    text-align: right;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
}

.back-home-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 9px;
    transition: var(--transition);
}

.back-home-btn:hover {
    background: var(--primary-dark);
}

/* =========================
   7. Admin Dashboard
========================= */

.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.admin-container>h2 {
    margin-bottom: 25px;
    color: var(--primary);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    color: #666;
    margin-bottom: 12px;
    font-size: 17px;
}

.stat-card p {
    font-size: 30px;
    font-weight: bold;
    color: var(--primary);
}

/* Admin Product Forms */

.admin-product-section,
.admin-products-section {
    background: white;
    padding: 25px;
    margin: 30px 0;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.admin-product-section h2,
.admin-products-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

#add-product-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#add-product-form h3 {
    color: var(--primary-dark);
    margin: 15px 0 5px;
}

#add-product-form label {
    font-weight: bold;
    color: #444;
}

#add-product-form input:not([type="checkbox"]):not([type="file"]),
#add-product-form select,
#add-product-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #D5E0E6;
    border-radius: 9px;
    background: white;
}

#add-product-form textarea {
    min-height: 90px;
    resize: vertical;
}

#add-product-form input[type="checkbox"] {
    margin-right: 8px;
}

#add-product-form input[type="file"] {
    padding: 10px 0;
}

#add-product-btn {
    padding: 13px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 9px;
    font-weight: bold;
    transition: var(--transition);
}

#add-product-btn:hover {
    background: var(--primary-dark);
}

/* Orders */

.orders-section {
    background: #F0F2F3;
    padding: 25px;
    margin: 30px 0;
    border-radius: 15px;
}

.orders-section>h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.order-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.order-filters input,
.order-filters select {
    flex: 1;
    min-width: 180px;
    padding: 12px;
    border: 1px solid #D5E0E6;
    border-radius: 9px;
    background: white;
}

#orders-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-order-card {
    background: white;
    padding: 22px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-order-card h3 {
    color: var(--primary);
    font-size: 20px;
}

.admin-order-card p {
    color: #555;
    margin: 0;
}

.admin-order-card label {
    font-weight: bold;
}

.status-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: 8px;
    background: white;
}

.update-status-btn {
    padding: 10px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    transition: var(--transition);
}

.update-status-btn:hover {
    background: var(--primary-dark);
}

.admin-order-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.admin-order-card a:hover {
    text-decoration: underline;
}

/* Order Status */

.order-status {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-processing {
    background: #FCE8E9;
    color: #A10D14;
}

.status-completed {
    background: #D1E7DD;
    color: #0F5132;
}

.status-cancelled {
    background: #F8D7DA;
    color: #842029;
}

/* =========================
   8. Admin Products Table
========================= */

.admin-products-table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-products-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 650px;
}

.admin-products-table th,
.admin-products-table td {
    padding: 13px;
    border-bottom: 1px solid #EEE;
    text-align: left;
}

.admin-products-table th {
    background: #FCEEEF;
    color: var(--primary-dark);
}

.admin-products-table img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

/* =========================
   9. Notifications
========================= */

.notification-wrapper {
    position: relative;
    display: inline-block;
}

#notification-btn {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    padding: 8px 12px;
}

#notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
}

#enable-sound {
    cursor: pointer;
    padding: 8px 12px;
    margin-left: 5px;
}

#notifications-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 320px;
    max-height: 350px;
    overflow-y: auto;
    background: white;
    color: #222;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px;
}

#notifications-dropdown.show {
    display: block;
}

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

.notification-item {
    padding: 12px;
    border-bottom: 1px solid #EEE;
    cursor: pointer;
}

.notification-item.unread {
    background: #FFF1F1;
}

.notification-item p {
    margin: 0 0 5px;
}

.notification-item small {
    color: #777;
}

#mark-all-read {
    cursor: pointer;
    font-size: 12px;
    color: var(--primary);
}

/* =========================
   10. Homepage Header
========================= */

.main-header {
    position: sticky;
    top: 12px;
    z-index: 1000;
    max-width: 1400px;
    width: calc(100% - 40px);
    margin: 12px auto 25px;
    padding: 18px 28px;
    background: rgba(17, 24, 32, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.20);
}

header.main-header {
    text-align: left;
    color: white;
}

.main-header h1 {
    margin-bottom: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.logo,
.main-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo:hover,
.main-header .logo:hover {
    color: var(--brand-green);
}

.logo-icon,
.main-header .logo-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: white;
    border-radius: 13px;
    font-size: 25px;
}

/* Real Logo Image */

.logo-image,
.main-header .logo-image {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    border-radius: 50%;
    background: var(--brand-dark);
    border: 2px solid var(--brand-red);
}

.language-switcher {
    display: flex;
    gap: 8px;
}

.language-switcher button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.language-switcher button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Navigation */

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 15px;
    flex-wrap: wrap;
}

header.main-header .main-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 15px;
}

.main-nav a,
header.main-header .main-nav a {
    color: #DCE1E5;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 10px 15px;
    border-radius: 10px;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active,
header.main-header .main-nav a:hover,
header.main-header .main-nav a.active {
    color: white;
    background: rgba(237, 21, 28, 0.18);
}

.main-nav .cart-link,
header.main-header .main-nav .cart-link {
    margin-left: auto;
    background: var(--primary);
    color: white;
    padding: 11px 22px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(237, 21, 28, 0.20);
}

.main-nav .cart-link:hover,
header.main-header .main-nav .cart-link:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

#cart-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    margin-left: 5px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    font-size: 12px;
}

/* =========================
   11. Hero Promotional Slider
========================= */

.hero-section {
    position: relative;
    isolation: isolate;
    display: block;
    min-height: 460px;
    margin: 25px 7%;
    padding: 0;
    border-radius: 25px;
    background: var(--brand-dark);
    box-shadow: 0 20px 50px rgba(17, 24, 32, 0.20);
    overflow: hidden;
}

.hero-section::before,
.hero-section::after {
    display: none;
}

.hero-slides-container {
    position: relative;
    width: 100%;
    min-height: 460px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    min-height: 460px;
    padding: 55px 7%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow: hidden;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-background-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg,
            rgba(17, 24, 32, 0.96) 0%,
            rgba(17, 24, 32, 0.82) 48%,
            rgba(17, 24, 32, 0.25) 100%);
}

.hero-content {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 2;
    animation: heroContentIn 0.7s ease both;
}

.hero-label {
    display: inline-block;
    color: white;
    background: rgba(237, 21, 28, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 7px 15px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

.hero-content h1 {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
}

.hero-content h1 span {
    display: block;
    color: var(--brand-green);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.8;
    max-width: 450px;
    margin-bottom: 23px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 13px 25px;
    border-radius: 11px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 9px 25px rgba(237, 21, 28, 0.25);
    transition: var(--transition);
}

.hero-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

.hero-btn:active {
    transform: scale(0.97);
}

@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-decoration {
    display: none;
}

/* Slider Controls */

.hero-slider-controls {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    pointer-events: none;
}

.hero-arrow,
.hero-dots {
    pointer-events: auto;
}

.hero-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(17, 24, 32, 0.65);
    color: white;
    font-size: 16px;
    transition: var(--transition);
}

.hero-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.55);
    transition: var(--transition);
    cursor: pointer;
}

.hero-dot.active {
    width: 25px;
    background: var(--primary);
}

/* =========================
   12. Features Section
========================= */

.features-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin: 45px 7%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 27px 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(8, 183, 71, 0.45);
}

.feature-item>span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 58px;
    background: rgba(8, 183, 71, 0.10);
    color: var(--brand-green);
    border-radius: 17px;
    font-size: 27px;
}

.feature-item h3 {
    color: var(--dark);
    font-size: 17px;
    margin-bottom: 7px;
}

.feature-item p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* =========================
   13. Homepage Product Sections
========================= */

.home-products-section,
.offers-section {
    padding: 70px 7%;
}

.offers-section {
    background: linear-gradient(120deg, #FCEEEF, #F7F8F9);
    border-top: 1px solid #F3D9DA;
    border-bottom: 1px solid #F3D9DA;
}

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

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-heading h2 {
    color: var(--dark);
    font-size: 34px;
    letter-spacing: -0.7px;
    margin-bottom: 8px;
}

.section-heading p {
    color: var(--muted);
    font-size: 15px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
    padding: 12px 18px;
    border: 1px solid #F0C7C9;
    border-radius: 11px;
    background: white;
    transition: var(--transition);
}

.section-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.home-products-section .product-card,
.offers-section .product-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 17px;
    background: white;
    box-shadow: 0 7px 25px rgba(17, 24, 32, 0.05);
    transition: var(--transition);
}

.home-products-section .product-card:hover,
.offers-section .product-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
}

.home-products-section .product-image,
.offers-section .product-image {
    height: 175px;
    object-fit: contain;
    margin-bottom: 12px;
}

.home-products-section .product-card h3,
.offers-section .product-card h3 {
    color: var(--dark);
    font-size: 17px;
}

.home-products-section .product-card p,
.offers-section .product-card p {
    color: var(--muted);
}

.home-products-section .product-card button,
.offers-section .product-card button {
    background: var(--primary);
    border-radius: 10px;
    font-weight: 700;
    padding: 11px;
}

.home-products-section .product-card button:hover,
.offers-section .product-card button:hover {
    background: var(--primary-dark);
}

/* =========================
   14. Footer
========================= */

.main-footer {
    background: linear-gradient(135deg, #111820, #080D12);
    color: white;
    padding: 55px 7% 22px;
    border-top: 4px solid var(--primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.footer-content h2 {
    font-size: 25px;
    margin-bottom: 12px;
}

.footer-content p {
    color: #C5D0D8;
}

.footer-content>div:last-child {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-content a {
    color: #EAF0F3;
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    color: var(--brand-green);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 20px;
    text-align: center;
    color: #C5D0D8;
    font-size: 13px;
}

/* =========================
   15. All Products Cards
========================= */

#products-container .product-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 5px 18px rgba(17, 24, 32, 0.06);
    transition: var(--transition);
    overflow: hidden;
}

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

.product-image-wrapper {
    height: 155px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: #F5F7F8;
    border-radius: 12px;
    overflow: hidden;
}

#products-container .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

#products-container .product-card:hover .product-image {
    transform: scale(1.05);
}

.product-category {
    align-self: flex-start;
    padding: 5px 10px;
    background: rgba(8, 183, 71, 0.10);
    color: #078C38;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-name {
    color: var(--dark);
    font-size: 16px;
    margin: 0;
}

.product-description {
    color: #718096;
    font-size: 12px;
    line-height: 1.5;
}

.product-price {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
}

.product-stock {
    font-size: 12px;
    font-weight: 600;
}

.product-stock.in-stock {
    color: #078C38;
}

.product-stock.out-of-stock {
    color: #D32F2F;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    margin-top: auto;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: #AAB6C5;
    cursor: not-allowed;
}

#featured-products-container .product-image,
#offers-container .product-image,
#new-arrivals-container .product-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
    padding: 12px;
}

#featured-products-container,
#offers-container,
#new-arrivals-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

#featured-products-container .product-card,
#offers-container .product-card,
#new-arrivals-container .product-card {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

/* =========================
   16. Products Page Background
========================= */

body:has(.products-page) {
    background:
        linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
        url("../images/ebram.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body:has(.products-page) header {
    position: sticky;
    top: 12px;
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: 12px auto 30px;
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(17, 24, 32, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

body:has(.products-page) header h1 {
    color: white;
    font-size: 27px;
    font-weight: 800;
    margin: 0;
}

body:has(.products-page) header nav {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

body:has(.products-page) header nav a {
    color: #E1E5E8;
    text-decoration: none;
    font-weight: 600;
}

body:has(.products-page) header nav a:hover {
    color: var(--primary);
}

body:has(.products-page) #language-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 11px 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

body:has(.products-page) #language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(237, 21, 28, 0.25);
}

body:has(.products-page) header nav a[href="products.html"] {
    color: white;
    background: rgba(237, 21, 28, 0.18);
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 700;
}

/* =========================
   17. Shared Inputs
========================= */

input,
select,
textarea {
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(237, 21, 28, 0.10);
}

/* =========================
   18. Responsive - 900px
========================= */

@media (max-width: 900px) {
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #orders-container {
        grid-template-columns: 1fr;
    }

    .features-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-section,
    .hero-slides-container,
    .hero-slide {
        min-height: 400px;
    }

    .hero-slide {
        padding: 45px 5%;
    }

    #product-details-container.product-details-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    .product-details-image-wrapper {
        min-height: 300px;
    }

    .product-details-image-wrapper .product-details-image {
        height: 270px;
    }

    .product-details-info {
        width: 100%;
    }

    .product-details-info .product-details-cart-btn {
        max-width: 100%;
    }
}

/* =========================
   19. Responsive - 700px
========================= */

@media (max-width: 700px) {
    .admin-container {
        margin: 20px auto;
        padding: 12px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    #product-details-container {
        flex-direction: column;
        gap: 20px;
    }

    .product-details-image {
        width: 100%;
        height: 280px;
    }

    .product-details-info {
        width: 100%;
    }

    .admin-order-card {
        align-items: stretch;
    }

    .features-section {
        grid-template-columns: 1fr;
    }

    .products-page {
        padding: 15px;
        margin: 25px auto;
    }

    .products-header h2 {
        font-size: 29px;
    }

    .products-controls {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

/* =========================
   20. Responsive - 600px
========================= */

@media (max-width: 600px) {
    header {
        padding: 20px 12px;
    }

    header h1 {
        font-size: 26px;
    }

    .main-header,
    header.main-header {
        padding: 16px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        gap: 14px;
        justify-content: center;
    }

    .main-nav .cart-link {
        margin-left: 0;
    }

    .products-section {
        padding: 25px 15px;
    }

    .products-page {
        padding: 12px;
    }

    .products-header h2 {
        font-size: 25px;
    }

    .products-controls {
        grid-template-columns: 1fr;
    }

    .products-controls input,
    .products-controls select {
        width: 100%;
    }

    .order-details-container {
        padding: 12px;
        margin: 20px auto;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-total {
        font-size: 19px;
    }

    .admin-product-section,
    .admin-products-section,
    .orders-section {
        padding: 15px;
    }

    /* Hero Mobile */

    .hero-section {
        margin: 18px 5%;
        min-height: 380px;
        border-radius: 18px;
    }

    .hero-slides-container,
    .hero-slide {
        min-height: 380px;
    }

    .hero-slide {
        padding: 35px 22px 70px;
        align-items: center;
    }

    .hero-overlay {
        background: linear-gradient(90deg,
                rgba(17, 24, 32, 0.95),
                rgba(17, 24, 32, 0.65));
    }

    .hero-content h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 20px;
    }

    .hero-btn {
        padding: 12px 20px;
    }

    .hero-slider-controls {
        bottom: 12px;
    }

    .features-section {
        margin: 25px 5%;
        gap: 15px;
    }

    .feature-item {
        padding: 22px 18px;
    }

    .home-products-section,
    .offers-section {
        padding: 45px 5%;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .section-link {
        margin-top: 5px;
    }

    .footer-content {
        flex-direction: column;
    }

    #products-container,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 13px;
    }

    #products-container .product-card {
        padding: 11px;
    }

    #products-container .product-image {
        height: 135px;
    }

    #products-container .product-card h3 {
        font-size: 15px;
    }

    body:has(.products-page) header {
        justify-content: center;
        padding: 18px;
    }

    body:has(.products-page) header nav {
        justify-content: center;
        gap: 15px;
    }

    .main-nav .cart-link {
        margin-left: 0;
    }
}

/* =========================
   21. Responsive - 480px
========================= */

@media (max-width: 480px) {
    #notifications-dropdown {
        width: 280px;
        right: -70px;
    }

    .order-filters {
        flex-direction: column;
    }

    .order-filters input,
    .order-filters select {
        width: 100%;
    }

    .logo,
    .main-header .logo {
        font-size: 19px;
        gap: 9px;
    }

    .logo-image,
    .main-header .logo-image {
        width: 48px;
        height: 48px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
    }

    .language-switcher button {
        padding: 8px 12px;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .hero-btn {
        padding: 12px 20px;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .product-details-page {
        margin: 20px auto;
        padding: 12px;
    }

    #product-details-container.product-details-layout {
        padding: 16px;
        gap: 22px;
        border-radius: 18px;
    }

    .product-details-image-wrapper {
        min-height: 230px;
        padding: 15px;
        border-radius: 15px;
    }

    .product-details-image-wrapper .product-details-image {
        height: 210px;
    }

    .product-details-info {
        gap: 13px;
    }

    .product-details-info .product-details-title {
        font-size: 25px;
    }

    .product-details-description {
        font-size: 14px;
    }

    .product-details-info .product-details-price {
        font-size: 21px;
    }

    .product-details-new-price {
        font-size: 24px;
    }

    .product-details-info .product-details-cart-btn {
        padding: 13px 18px;
    }
}

/* =========================
   22. Accessibility & Motion
========================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(8, 183, 71, 0.55);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}