/* Base Styles */
:root {
    --primary-color: #0052cc;
    --secondary-color: #ff006e;
    --accent-color: #fb5607;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --gray-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --border-radius: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --primary-color-rgb: 29, 164, 222; /* This is #1da4de in RGB format */
    --white: #ffffff;
    --text-color: #333333;
    --light-text: #666666;
    --light-bg: #f8f9fa;
    --transition: all 0.3s ease;
}

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

body {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: var(--light-color);
}

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

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

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

.btn-secondary:hover {
    background-color: #e00063;
    border-color: #d3005d;
}

.btn-link {
    font-weight: 400;
    color: var(--primary-color);
    background-color: transparent;
    border: none;
}

.btn-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    display: block;
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 0.5rem;
    width: auto;
}

.error-message {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Modern Navbar Styles */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: relative;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.navbar-logo {
    display: block;
    z-index: 20;
}

.navbar-logo img {
    max-width: 72px;
    height: auto;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.navbar-nav li a {
    color: var(--dark-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}

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

.navbar-search {
    position: relative;
}

.navbar-search form {
    display: flex;
    align-items: center;
}

.navbar-search input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 50px;
    font-size: 0.9rem;
    min-width: 220px;
    transition: all 0.3s;
}

.navbar-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(29, 164, 222, 0.2);
}

.navbar-search button {
    background: none;
    border: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    cursor: pointer;
    transition: color 0.3s;
}

.navbar-search button:hover {
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
}

.navbar-actions li a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-actions li a:hover {
    color: var(--primary-color);
}

.navbar-actions li form button {
    background: none;
    border: none;
    color: var(--dark-color);
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: color 0.3s;
}

.navbar-actions li form button:hover {
    color: var(--primary-color);
}

.cart-icon {
    position: relative;
    display: flex;
}

.cart-icon i {
    font-size: 1.25rem;
}

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

.navbar-hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 20;
}

.navbar-hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--dark-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.navbar-hamburger span:nth-child(1) {
    top: 0px;
}

.navbar-hamburger span:nth-child(2) {
    top: 8px;
}

.navbar-hamburger span:nth-child(3) {
    top: 16px;
}

.navbar-hamburger.active span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.navbar-hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.navbar-hamburger.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Responsive Navbar */
@media (max-width: 1024px) {
    .navbar-search input {
        min-width: 180px;
    }
}

@media (max-width: 992px) {
    .navbar-hamburger {
        display: block;
    }

    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 10;
        gap: 2rem;
        overflow-y: auto;
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .navbar-search {
        width: 100%;
    }

    .navbar-search input {
        width: 100%;
        min-width: unset;
    }

    .navbar-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    body.menu-open {
        overflow: hidden;
    }

    .navbar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9;
        display: none;
    }

    .navbar-overlay.active {
        display: block;
    }
}

@media (max-width: 576px) {
    .navbar-logo img {
        max-width: 60px;
    }

    .navbar-menu {
        width: 85%;
        max-width: 300px;
    }
}

/* Auth Pages */
.auth-container {
    padding: 3rem 0;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-description {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-color);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.forgot-password-link {
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.remember-me {
    margin: 1rem 0;
}

.terms-agreement {
    margin: 1rem 0;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 3rem 0 1.5rem;
}

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

.footer-logo h3 {
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: #adb5bd;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.footer-column a:hover {
    color: #fff;
}

.footer-newsletter h4 {
    margin-bottom: 1rem;
}

.footer-newsletter form {
    display: flex;
    gap: 0.5rem;
}

.footer-newsletter input {
    flex-grow: 1;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: none;
}

.footer-newsletter button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.footer-newsletter button:hover {
    background-color: #0069d9;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #343a40;
    gap: 1rem;
}

.copyright {
    color: #adb5bd;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #adb5bd;
}

.social-links a:hover {
    color: #fff;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #adb5bd;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.overlay.active {
    display: block;
}

.no-scroll {
    overflow: hidden;
}

/* Featured Categories with Circular Design */
.featured-categories {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

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

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.category-image-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover .category-image-circle {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

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

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay {
    background: linear-gradient(
        to top,
        rgba(var(--primary-color-rgb), 0.8),
        transparent
    );
}

.category-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-color);
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.category-info {
    padding: 1.2rem;
    text-align: center;
    width: 100%;
}

.category-description {
    margin-bottom: 0.5rem;
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.category-count {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
}

.no-categories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.view-all {
    text-align: center;
    margin-top: 1rem;
}

.view-all .btn-link {
    font-size: 1.1rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all .btn-link:hover {
    color: var(--secondary-color);
}

.view-all .btn-link:after {
    content: "→";
    transition: transform 0.3s ease;
}

.view-all .btn-link:hover:after {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }

    .category-image-circle {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-image-circle {
        width: 140px;
        height: 140px;
    }

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

    .section-title {
        font-size: 1.8rem;
    }
}

/* Product Grids */
.featured-products,
.new-arrivals {
    padding: 4rem 0;
}

.featured-products {
    background-color: #fff;
}

.new-arrivals {
    background-color: #f8f9fa;
}

.product-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 2x4 Product Grid Layout */
.products-grid-2x4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2rem;
}

.product-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #f0f0f0;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

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

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #888;
    font-size: 0.9rem;
}

.product-badge {
    position: absolute;
    top: 12px;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.sale {
    left: 12px;
    background-color: #ff6b6b;
    color: white;
}

.product-badge.featured {
    right: 12px;
    background-color: var(--primary-color);
    color: white;
}

.product-badge.new {
    right: 12px;
    background-color: #20c997;
    color: white;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: white;
}

.product-name {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.product-name a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

.product-category {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.product-category a {
    color: var(--gray-color);
    text-decoration: none;
}

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

.product-price {
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1.15rem;
}

.regular-price {
    color: var(--dark-color);
}

.sale-price {
    color: #ff6b6b;
    margin-left: 0.5rem;
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-actions .btn-secondary {
    background-color: #f1f8fd;
    color: var(--primary-color);
    border: none;
}

.product-actions .btn-secondary:hover {
    background-color: #e3f1fb;
}

.product-actions .btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.product-actions .btn-primary:hover {
    background-color: #1993c7;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    color: var(--gray-color);
}

/* Responsive Product Grid */
@media (max-width: 1200px) {
    .products-grid-2x4 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, auto);
    }
}

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

@media (max-width: 576px) {
    .products-grid-2x4 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .featured-products,
    .new-arrivals {
        padding: 2rem 0;
    }
}

/* Add to Cart Success Modal */
.cart-success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background-color: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 380px;
    max-width: 90vw;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-success-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cart-success-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.8rem;
    border-radius: 50%;
    background-color: #0a7940;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cart-success-icon svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: check-animation 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.cart-success-message {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.7rem;
}

.cart-success-details {
    font-size: 1rem;
    color: var(--gray-color);
    margin-bottom: 1.8rem;
    line-height: 1.4;
}

.cart-success-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

@keyframes check-animation {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes circle-animation {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
