:root {
    --primary-color: #b37952;
    --secondary-color: #b0a494;
    --dark-color: #a0a585;
    --light-color: #e8e7d5;
    --text-color: #724323;
    --white: #ffffff;
    --gray: #e0e0e0;
    --dark-gray: #777;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    /* height: 100%; */
    /* overflow: hidden; */
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    background-color: var(--white);
    color: var(--dark-color);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: #6e675e; /* لون قريب من لون الشعار */
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-icon:hover, .cart-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.cart-icon {
    position: relative;
}

.user-icon, .cart-icon {
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.cart-icon {
    position: relative;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
}

/* Search Bar */
.search-container {
    position: relative;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--dark-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease;
    z-index: 2;
}

.search-btn i {
    font-size: 18px;
    pointer-events: none;
}

.search-input-wrapper {
    position: relative;
    right: 0;
    height: 45px;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: width 0.6s ease, opacity 0.6s ease;
    width: 0;
    opacity: 0;
    border-radius: 25px;
    background-color: var(--light-color);
    padding-left: 0;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0 15px 0 0;
    font-size: 16px;
    outline: none;
    color: var(--text-color);
    height: 100%;
    width: 200px;
}

.search.active .search-btn {
    transform: rotate(360deg);
}

.search.active .search-input-wrapper {
    width: 200px;
    opacity: 1;

    pointer-events: auto;
}

/* Sidebar Navigation */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

body.sidebar-open {
    overflow: hidden;
}

body.sidebar-open .sidebar-overlay {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
}

.sidebar ul li a {
    display: block;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.sidebar ul li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.submenu ul {
    padding-left: 20px;
    margin-top: 5px;
    display: none;
}

.submenu.active ul {
    display: block;
}

.submenu a i {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.submenu.active a i {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--dark-color);
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
    animation: fadeIn 1s ease;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(179, 121, 82, 0.4);
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

.category-card h3 {
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    color: var(--dark-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 40px;
    min-height: 340px;
}
.products-grid:empty::after {
    content: '';
    grid-column: span 3;
}
.products-grid > .product-card {
    min-height: 340px;
}
.products-grid > * {
    min-width: 0;
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.product-image {
    height: 300px;
    overflow: hidden;
    position: relative;
}

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

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

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-right: 5px;
}

.add-to-cart {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.add-to-cart:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

.add-to-cart i {
    transition: transform 0.3s ease;
}

.add-to-cart:hover i {
    transform: rotate(90deg);
}

.add-to-cart::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.add-to-cart:hover::before {
    transform: translateX(0);
}

/* Quantity controls */
.quantity-control {
    display: flex;
    align-items: center;
    margin-top: 10px;
    border: 1px solid var(--gray);
    border-radius: 30px;
    width: fit-content;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

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

.quantity-control input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray);
    border-right: 1px solid var(--gray);
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Testimonials */
.testimonials {
    margin: 50px 0;
}

.testimonial-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.testimonial {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.testimonial p {
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.customer {
    font-weight: bold;
    color: var(--primary-color);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    border-radius: 10px;
    margin: 40px 0;
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter-btn {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background-color: #7a8a6d;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 5% 1rem;
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-about p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.social-links a {
    color: white;
    margin-right: 15px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    right: 0;
}

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

.footer-links ul li a {
    color: #ddd;
    transition: all 0.3s ease;
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ddd;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(179, 121, 82, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(179, 121, 82, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(179, 121, 82, 0);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header-container {
        justify-content: center;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo h1 {
        font-size: 24px;
        white-space: nowrap;
    }
    
    .header-left {
        order: 1;
        flex: 0 0 auto;
    }
    
    .header-right {
        order: 3;
        flex: 0;
        display: flex;
        gap: 10px;
        margin-left: auto;
    }
    
    .search {
        position: static;
    }
    
    .search.active .search-btn {
        transform: rotate(360deg);
    }
    
    .search.active .search-input-wrapper {
        width: 180px;
        margin-right: 35px;
    }

    .search-results {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        max-height: 300px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid var(--gray);
    }

    .no-results {
        padding: 15px;
        text-align: center;
        color: var(--dark-gray);
    }
    
    .user-icon {
        order: 2;
    }
    
    .cart-icon {
        order: 3;
    }

    .products-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    .sort-filter, .category-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-filter select, .category-filter select {
        width: 100%;
    }
    
    .sort-filter::after, .category-filter::after {
        right: 20px;
    }

    .hero {
        height: 50vh;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        border-radius: 30px;
        margin-bottom: 10px;
    }
    
    .newsletter-btn {
        border-radius: 30px;
        padding: 15px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        height: 40vh;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .product-card {
        min-width: 100%;
    }

    .filter-options {
        justify-content: flex-end;
        gap: 20px;
    }
    
    .sort-filter, .category-filter {
        flex: 1;
        min-width: auto;
    }
    
    .sort-filter select, .category-filter select {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .sort-filter label, .category-filter label {
        display: none; /* إخفاء التسميات في الشاشات الصغيرة جدًا */
    }
}

/* Animations */
@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Product Detail Page Styles */
.product-detail-page {
    padding: 20px;
}

.product-detail-container {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.product-images {
    flex: 1;
}

.main-image {
    border: 1px solid var(--gray);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

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

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

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--gray);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail-images img:hover {
    border-color: var(--primary-color);
}

.product-info {
    flex: 1;
}

.product-meta {
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.product-rating i {
    color: #ffc107;
}

.product-options {
    margin: 30px 0;
}

.size-options, .color-options, .quantity-selector {
    margin-bottom: 20px;
}

.size-selector, .color-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.size-selector input[type="radio"] {
    display: none;
}

.size-selector label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 50px;
    height: 50px;
    padding: 0 15px; /* Add horizontal padding */
    border: 1px solid var(--gray);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    background-color: var(--white);
    color: var(--text-color);
}

.size-selector input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: white;
}

.color-selector input[type="radio"] {
    display: none;
}

.color-selector label {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.color-selector input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.product-details ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.product-reviews {
    margin-top: 40px;
}

.review-form {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.review-form h4 {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray);
    border-radius: 5px;
}

.related-products h2 {
    margin-bottom: 20px;
}

/* Cart Page Styles */
.cart-page {
    padding: 20px;
}

.cart-container {
    display: flex;
    gap: 30px;
}

.cart-items {
    flex: 2;
}

.cart-summary {
    flex: 1;
    background: #fff !important;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18), 0 2px 8px 0 rgba(0,0,0,0.12) !important;
    border-radius: 16px !important;
    margin-bottom: 28px !important;
    border: none !important;
    padding: 20px;
    height: fit-content;
}

.cart-header, .cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr; /* From 5 columns to 4 */
    gap: 15px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray);
}

.header-product, .cart-item-product {
    text-align: left;
}

.header-quantity, .cart-item-quantity,
.header-total, .cart-item-total,
.header-remove, .cart-item-remove {
    text-align: center;
}

.cart-item-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-item-image {
    width: 90px;
    height: 110px;
    flex-shrink: 0;
}

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

.cart-item-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.item-options {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.cart-item-total {
    font-weight: bold;
}

.cart-item-remove i {
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.cart-item-remove .remove-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-size: 1.5rem;
    padding: 5px;
}

.cart-item-remove .remove-btn:hover {
    transform: scale(1.2);
}

.cart-item-remove .remove-btn:hover i {
    color: #dc3545;
}

.quantity-control {
    display: inline-flex; /* Use inline-flex to contain it */
    justify-content: center;
    align-items: center;
    border: 1px solid var(--gray);
    border-radius: 5px;
    margin: 0 auto;
}

.quantity-control .quantity-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray);
    border-right: 1px solid var(--gray);
    padding: 8px 0;
    font-size: 1rem;
    -moz-appearance: textfield;
    background: transparent;
}

.empty-cart-message {
    text-align: center;
    padding: 40px 0;
}

.empty-cart-message p {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray);
}

.summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: none;
}

.checkout-btn {
    width: 100%;
    margin-top: 20px;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary-color);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-options {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.cart-item-quantity input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    padding: 5px;
    margin-left: auto;
}

.cart-item-remove:hover {
    color: #e74c3c;
    transform: scale(1.2);
}

.cart-item-size {
    font-size: 0.85rem;
    color: var(--dark-color);
    display: block;
    font-weight: 600;
}

/* About Page Styles */
.about-page {
    padding: 20px;
}

.about-content {
    margin-top: 30px;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.about-section ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

/* Contact Page Styles */
.contact-page {
    padding: 20px;
}

.contact-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.contact-info {
    flex: 1;
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
}

.contact-form {
    flex: 1;
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-item i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

/* Login Page Styles */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-container {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.auth-content {
    padding: 30px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 139, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
}

.social-login {
    margin-top: 30px;
    text-align: center;
}

.social-login p {
    margin-bottom: 15px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--gray);
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn.facebook {
    background-color: #3b5998;
    color: white;
}

.social-btn.google {
    background-color: #db4437;
    color: white;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Terms Agreement Checkbox Styles */
.terms-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.terms-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.terms-label {
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.terms-label a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.terms-label a:hover {
    color: var(--dark-color);
}

/* Return Policy Page Styles */
.return-policy-page {
    padding: 20px;
}

.policy-content {
    margin-top: 30px;
}

.policy-section {
    margin-bottom: 30px;
}

.policy-section h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.policy-section ol {
    padding-left: 20px;
}

.policy-section li {
    margin-bottom: 10px;
}

.return-request-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

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

.filter-options {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap; /* لمنع الانتقال لسطر جديد */
    overflow-x: auto; /* يسمح بعمل سكرول أفقي إذا احتاج المساحة */
    padding-bottom: 10px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.sort-filter, .category-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 120px;
    flex-shrink: 0; /* يمنع تصغير العناصر */
}

.sort-filter label, .category-filter label {
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
    font-size: 12px;
    display: none; /* إخفاء التسميات في الشاشات الصغيرة */
}

.sort-filter select, .category-filter select {
    padding: 8px 25px 8px 10px;
    border: 1px solid var(--gray);
    border-radius: 20px;
    background-color: var(--white);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
    appearance: none;
    min-width: 120px;
}

.sort-filter::after, .category-filter::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--dark-color);
}

.sort-filter select:focus, .category-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(179, 121, 82, 0.2);
}

.sort-filter select:hover, .category-filter select:hover {
    border-color: var(--primary-color);
}

@media (min-width: 480px) {
    .sort-filter label, .category-filter label {
        display: inline; /* إظهار التسميات في الشاشات الأكبر */
    }
    
    .sort-filter, .category-filter {
        gap: 8px;
    }
    
    .sort-filter select, .category-filter select {
        font-size: 14px;
        padding: 8px 30px 8px 15px;
    }
}

/* Toast Message Styles */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-message.show {
    opacity: 1;
}

/* Empty Cart Message Styles */
.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.empty-cart-message p {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--dark-color);
}

/* Remove Button Hover Effect */
.cart-item-remove:hover {
    color: #e74c3c !important;
    transform: scale(1.2);
}

/* Clear Cart Button Styles */
.clear-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 240px;
    margin: 15px auto 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(179, 121, 82, 0.3);
}

.clear-cart-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

.clear-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(179, 121, 82, 0.3);
}

.clear-cart-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.clear-cart-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.clear-cart-btn i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.clear-cart-btn:hover i {
    transform: translateX(5px);
}

/* Adjust spacing between buttons */
.checkout-btn {
    margin-bottom: 10px;
}

.continue-shopping {
    margin-top: 15px;
}

/* Responsive Styles for All Pages */
@media (max-width: 992px) {
    .product-detail-container {
        flex-direction: column;
    }
    
    .cart-container {
        flex-direction: column;
    }
    
    .contact-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    
    .cart-item {
        align-items: center;
    }
    
    .cart-item-title {
        font-size: 1.1rem;
    }
    
    .header-price,
    .cart-item-price {
        display: block;
        text-align: center;
        flex: 1;
    }
    
    .cart-header {
        display: flex;
        padding: 15px 0;
        border-bottom: 1px solid var(--gray);
        font-weight: bold;
    }
    
    .header-product {
        flex: 2;
    }
    
    .header-quantity, 
    .header-total {
        flex: 1;
        text-align: center;
    }
    
    .header-remove {
        width: 30px;
    }
    
    .cart-item {
        display: flex;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid var(--gray);
    }
    
    .cart-item-product {
        flex: 2;
        display: flex;
        align-items: center;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
        margin-right: 15px;
    }
    
    .cart-item-quantity {
        flex: 1;
        text-align: center;
    }
    
    .cart-item-remove {
        width: 30px;
        text-align: center;
    }
}

@keyframes underlineGrow {
    from { width: 0; }
    to { width: 100%; }
}

/* Search Results Styles */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

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

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
}

.search-result-item .product-info {
    flex: 1;
}

.search-result-item .product-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.search-result-item .product-price {
    color: var(--primary-color);
    font-size: 14px;
}

.search-result-item.category-result {
    background-color: #f8f9fa;
}

.search-result-item.category-result:hover {
    background-color: #e9ecef;
}

.search-result-item.category-result .product-name {
    color: var(--primary-color);
}

.search-result-item.category-result .category-label {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.search-result-item.selected,
.more-results.selected {
    background-color: #e3f2fd !important;
    border-left: 3px solid var(--primary-color);
}

.search-result-item.selected:hover,
.more-results.selected:hover {
    background-color: #e3f2fd !important;
}

.search-result-item.category-result.selected {
    background-color: #e3f2fd !important;
}

.search-result-item.category-result.selected:hover {
    background-color: #e3f2fd !important;
}

.more-results {
    padding: 12px;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.more-results:hover {
    background-color: #f8f9fa;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.no-results i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ccc;
}

.no-results .suggestion {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Mobile responsive search results */
@media (max-width: 768px) {
    .search-results-container {
        position: fixed;
        top: 80px;
        left: 10px;
        right: 10px;
        max-height: 60vh;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    }
    
    .search-result-item {
        padding: 15px;
    }
    
    .search-result-item img {
        width: 60px;
        height: 60px;
    }
}

.color-circle {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-title-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Checkout Modal Styles */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkout-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.checkout-container {
    background-color: var(--white);
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.checkout-modal.active .checkout-container {
    transform: translateY(0);
}

.checkout-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

.checkout-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.checkout-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--gray);
    z-index: 1;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--gray);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    text-align: center;
}

.checkout-step.active .step-number {
    background-color: var(--primary-color);
}

.checkout-step.completed .step-number {
    background-color: var(--dark-color);
}

.checkout-content {
    margin-top: 30px;
}

.checkout-form {
    display: none;
}

.checkout-form.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(179, 121, 82, 0.2);
}

.checkout-summary {
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.checkout-summary h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray);
}

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

.checkout-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    position: relative;
}

.checkout-back {
    position: absolute !important;
    bottom: -40px !important;
    left: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 15px !important;
    box-shadow: none !important;
    display: inline-flex !important;
    background-color: transparent !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.checkout-back:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.checkout-next {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(179, 121, 82, 0.3);
}

.checkout-next:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

.checkout-next:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(179, 121, 82, 0.3);
}

.checkout-next::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.checkout-next:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.checkout-complete {
    text-align: center;
    padding: 40px 20px;
}

.checkout-complete i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .checkout-steps {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .checkout-step {
        flex: 1 0 33%;
    }
    
    .checkout-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .checkout-back {
        position: absolute !important;
        bottom: -40px !important;
        left: 0 !important;
        width: auto !important;
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
        display: inline-flex !important;
    }
}

/* Cities of Egypt for shipping */
#city option {
    padding: 10px;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(179, 121, 82, 0.3);
}

.add-to-cart-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(179, 121, 82, 0.3);
}

.add-to-cart-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.add-to-cart-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.add-to-cart-btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.add-to-cart-btn:hover i {
    transform: translateX(5px);
}

/* إضافة قواعد جديدة */
.color-selector {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.color-selector input[type="radio"] {
    display: none;
}

.color-option {
    display: inline-block;
}

.color-circle {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.color-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 50%;
}

.color-selector input[type="radio"]:checked + .color-circle,
.color-circle.selected {
    border: 2px solid var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive for color selector */
@media only screen and (max-width: 768px) {
    .color-selector {
        gap: 10px;
        justify-content: flex-start;
        padding: 10px 0;
    }
    
    .color-circle {
        width: 35px;
        height: 35px;
        margin: 0;
        border-width: 3px;
    }
    
    .color-options h3 {
        margin-bottom: 15px;
        font-size: 1.1rem;
    }
    
    .color-option {
        margin: 2px;
    }
    
    .color-selector input[type="radio"]:checked + .color-circle,
    .color-circle.selected {
        border-width: 3px;
        transform: scale(1.2);
    }
}

/* Extra small screens */
@media only screen and (max-width: 480px) {
    .color-circle {
        width: 40px;
        height: 40px;
    }
    
    .color-selector {
        gap: 8px;
    }
}

/* تنسيق طرق الدفع */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
    max-width: 600px;
    width: 100%;
}

/* كل خيار دفع */
.payment-method {
    background-color: #f9f6f2;
    border: 2px solid #e8e7d5;
    color: #6d4c2c;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* الخيار النشط */
.payment-method.active {
    border-color: #b37952;
    background-color: #f3e7d9;
    color: #b37952;
}

/* الخيار المعطل */
.payment-method.disabled {
    opacity: 0.6;
    background-color: #f1f1f1;
    pointer-events: none;
}

/* تنسيق النص والأيقونة */
.payment-method label {
    color: #6d4c2c;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
}

/* الراديو */
.payment-method input[type="radio"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #b37952;
}

/* الأيقونة (مثل صورة الكاش أو الفيزا) */
.payment-method i,
.payment-method img {
    color: #b37952;
    flex-shrink: 0;
    font-size: 1.4rem;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* شارة COMING SOON */
.coming-soon {
    background-color: #b37952;
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: bold;
}

/* تحسين العرض على الشاشات الصغيرة */
@media (max-width: 480px) {
    .payment-method {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }

    .payment-method label {
        flex-direction: row;
        font-size: 15px;
    }

    .coming-soon {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* استايل زر الشيك آوت ليكون مثل زر أضف إلى السلة */
.checkout-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 240px;
    margin: 15px auto 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(179, 121, 82, 0.3);
}

.checkout-btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 121, 82, 0.6);
}

.checkout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(179, 121, 82, 0.3);
}

.checkout-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.checkout-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.checkout-btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.checkout-btn:hover i {
    transform: translateX(5px);
}

/* New Responsive Cart Styles */

/* Mobile First Styles (default) */
.cart-header {
    display: none; /* Hide desktop header on mobile */
}

.cart-item-responsive {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray);
    position: relative;
}

.cart-item-responsive-main {
    display: flex;
    flex-grow: 1;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cart-item-title {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-options {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.mobile-price-and-quantity {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cart-item-total-mobile {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Hide desktop elements on mobile */
.cart-item-price-desktop,
.cart-item-quantity-desktop,
.cart-item-total-desktop {
    display: none;
}

.cart-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}
.cart-item-remove:focus,
.cart-item-remove:hover {
    /* This rule is removed to avoid conflict and the !important flag */
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray);
    border-radius: 5px;
    background: transparent;
}
.quantity-control .quantity-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    font-size: 1rem;
    cursor: pointer;
}
.quantity-control .quantity-input {
    width: 35px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray);
    border-right: 1px solid var(--gray);
    padding: 5px 0;
    font-size: 1rem;
    -moz-appearance: textfield;
}

/* New Mobile Cart Layout Styles */
.cart-item-responsive {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18), 0 2px 8px 0 rgba(0,0,0,0.12);
    border: none;
    display: block !important;
}

.cart-item-responsive-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cart-item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.cart-item-remove:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.cart-item-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.cart-item-size,
.cart-item-color {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-item-size b,
.cart-item-color b {
    color: var(--text-color);
    font-weight: 600;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 15px; /* إرجاع المسافة الأصلية للاب توب */
    flex-wrap: wrap;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
    min-width: 0;
    width: auto;
    height: 32px;
    padding: 0 2px;
    box-sizing: border-box;
    margin-inline-end: 10px;
}

.cart-item-quantity .quantity-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.cart-item-quantity .quantity-btn:hover {
    background-color: var(--light-color);
}

.cart-item-quantity .quantity-btn:active {
    background-color: #e0e0e0;
}

.cart-item-quantity .quantity-display {
    width: 32px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.cart-item-total {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Desktop Styles */
@media (min-width: 769px) {
    .cart-header {
        display: grid;
        grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
        gap: 20px;
        padding: 10px 0;
    }
    
    .header-product {
        text-align: left;
    }

    /* Hide mobile layout on desktop */
    .cart-item-responsive {
        display: none;
    }

    /* Show desktop layout */
    .cart-item {
        display: grid;
        grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
        gap: 20px;
        align-items: center;
        padding: 20px 0;
        border-bottom: 1px solid var(--gray);
    }

    .cart-item-product {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .cart-item-image {
        width: 90px;
        height: 110px;
    }

    .cart-item-details {
        margin-left: 0;
    }
    
    .cart-item-title {
        font-size: 1.1rem;
    }
    
    .item-options {
        font-size: 0.9rem;
    }

    /* Show desktop elements */
    .cart-item-price-desktop,
    .cart-item-quantity-desktop,
    .cart-item-total-desktop {
        display: block;
        text-align: center;
        font-size: 1.1rem;
    }

    .cart-item-remove {
        position: static;
        text-align: center;
    }
}

@media (max-width: 900px) {
  .cart-header {
    display: none !important;
  }

  /* Hide desktop layout on mobile */
  .cart-item {
    display: none !important;
  }

  /* Show mobile layout */
  .cart-item-responsive {
    display: block !important;
  }
  
  /* تعديلات الموبايل المضغوطة */
  .cart-item-details {
    gap: 0px; /* إزالة المسافة في الموبايل فقط */
  }
  
  .cart-item-options {
    gap: 0px; /* إزالة المسافة في الموبايل فقط */
    margin-bottom: 0px; /* إزالة المسافة في الموبايل فقط */
  }
  
  .cart-item-bottom {
    gap: 1px; /* تقليل المسافة في الموبايل فقط */
    flex-direction: column; /* ترتيب عمودي في الموبايل */
    align-items: flex-start; /* محاذاة للبداية */
  }
  
  /* ترتيب العداد فوق المجموع في الموبايل */
  .cart-item-quantity {
    order: 1; /* العداد أولاً */
    margin-bottom: 8px; /* مسافة بين العداد والمجموع */
  }
  
  .cart-item-total {
    order: 2; /* المجموع ثانياً */
    align-self: flex-end; /* محاذاة المجموع لليمين */
  }
}

.cart-item-wrapper, .cart-item {
  background: #fff !important;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18), 0 2px 8px 0 rgba(0,0,0,0.12) !important;
  margin-bottom: 28px !important;
  border-radius: 16px !important;
  position: relative !important;
  z-index: 10 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  border: none !important;
}
.cart-items-list, .cart-container, .cart-items {
  overflow: visible !important;
  background: transparent !important;
}

.cart-items-list {
    margin-top: 24px !important;
}

.cart-item-remove .remove-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 1.5rem; /* Increased icon size */
    padding: 5px; /* Add some padding to make it easier to click */
}

.cart-item-remove .remove-btn:hover {
    color: #dc3545 !important; /* Red color with high priority */
    transform: scale(1.2);
}

.sold-out-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #d32f2f;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.92;
}

.content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 600px) {
  .video-background .content, .content {
    font-size: 1.25rem !important;
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: 98vw !important;
    line-height: 1.5 !important;
  }
}

html, body {
    overflow-x: hidden !important;
}

/* Center video perfectly and prevent overflow */
.video-background,
.video-wrapper {
  width: 100% !important;
  max-width: 100vw !important;
  height: 90vh !important;
  min-height: 90vh !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.video-background video {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: 100% !important;
  max-height: 90vh !important;
  transform: translate(-50%, -50%) !important;
  object-fit: cover !important;
  object-position: center 25% !important;
  display: none;
  z-index: 1;
}

.video-background video:first-child {
  display: block;
}

@media (max-width: 600px) {
  .video-background .content, .content {
    font-size: 1.25rem !important;
    padding: 18px 12px !important;
    border-radius: 12px !important;
    background-color: rgba(0,0,0,0.38) !important;
    max-width: 98vw !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 12px #0002;
  }
  .video-background .content h1, .content h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.7em !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
  }
}

.cart-item-price, .cart-item-price-desktop {
    color: var(--primary-color) !important;
    font-weight: bold;
    font-size: 1.1rem;
}

.search-result-item.category-result {
    background-color: #f8f9fa;
}

.search-result-item.category-result:hover {
    background-color: #e9ecef;
}

.search-result-item.category-result .product-name {
    color: var(--primary-color);
}

.search-result-item.category-result .category-label {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Search Results Styles */
.search-result-item.selected,
.more-results.selected {
    background-color: #e3f2fd !important;
    border-left: 3px solid var(--primary-color);
}

.search-result-item.selected:hover,
.more-results.selected:hover {
    background-color: #e3f2fd !important;
}

.search-result-item.category-result.selected {
    background-color: #e3f2fd !important;
}

.search-result-item.category-result.selected:hover {
    background-color: #e3f2fd !important;
}
