
html {
    overflow-x: hidden;
}

:root {
    --text-color: #ffffff;
    --background-color: #1a1a1a;
    --primary-color: #ff69b4;
    --secondary-color: #ffd700;
    --border-color: #ffd700;
    --header-footer-background: #feeef1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color); 
    color: var(--text-color);
    background-image: url('https://firebasestorage.googleapis.com/v0/b/craftcreationsbybetsy-fdc3b.firebasestorage.app/o/background.png?alt=media&token=fd298507-0605-406c-a911-e8a4a8439148');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

.side-nav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.side-nav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.side-nav a:hover {
    color: #f1f1f1;
}

.side-nav .close-btn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

header {
    background-color: var(--header-footer-background);
    border-bottom: 1px solid var(--border-color);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.logo {
    font-family: 'Caveat Brush', cursive;
    font-size: 3.5rem;
    font-weight: bold;
    text-align: center;
    color: #000000;
    margin: 0;
}

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

main {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 15px;
}

.products-header h2 {
    font-size:2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
    padding-top: 0;
    margin-top: 0;
}

.category-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin:1.2rem;
}

.category-buttons .category-button {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.category-buttons .category-button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #000;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background-color: #2a2a2a;
    text-align: left;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.product-card .image-container {
    position: relative;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.product-card img ~ img {
    display: none;
}

.product-card .f-slider-arrows {
    display: none;
}


.product-card h3 {
    font-size: 1rem;
    font-weight: normal;
    margin: 0.5rem 0 0.25rem;
    color: var(--primary-color);
}

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

.product-card .price {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin: 0;
}

.add-to-cart {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none; 
    white-space: nowrap
}

#contact {
    background-color: transparent;
    padding: 2rem;
    border: none;
    border-radius: 8px;
    margin-top: 2rem;
}

#contact h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

#contact form {
    display: flex;
    flex-direction: column;
}

#contact label {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

#contact input,
#contact textarea {
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

#contact button {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}


footer {
    background-color: var(--header-footer-background);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1rem;
    margin-top: 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright-text {
    color: #000000;
    text-align: left;
    margin-right: auto;
}

.social-media {
    display: flex;
    gap: 1.5rem;
    margin-right: 40px;
}

.social-media a {
    color: var(--primary-color);
    font-size: 1.5rem;
}


.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.showcase-card {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.showcase-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}


#scrollToTopBtn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 99;
    border: none;
    background-color: var(--primary-color);
    color: black;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scrollToTopBtn:hover {
    background-color: var(--secondary-color);
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    background-color: #1a1a1a;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    align-items: center;
}

.item-image img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
}

.checkout-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    text-align: center;
}


.floating-return-button {
    position: fixed;
    bottom: 10px;
    right: 10px; 
    z-index: 99;
    background-color: var(--primary-color);
    color: black;
    padding: 8px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
}

.floating-return-button:hover {
    background-color: var(--secondary-color);
}

.fab {
    position: fixed;
    z-index: 1000;
    background-color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s;
    text-decoration: none;
}

.fab:hover {
    background-color: var(--secondary-color);
}

.fab > i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: black;
}

.fab.fab-menu {
    top: 5px;
    left: 10px;
}

.fab.fab-cart {
    top: 5px;
    right: 10px;
}

/* Styles for full-width image cards */
.product-card-full-image {
    padding: 0;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    background-color: #2a2a2a; 
}

.product-card-full-image .product-info {
    padding: 0.5rem 1rem;
}

.product-card-full-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 2rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    text-align: center;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
}

/* Contact Details Section */
.contact-details {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.contact-info-left,
.contact-info-right {
    flex: 1;
    min-width: 250px;
}

.contact-details h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.contact-details p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whatsapp-contact {
    margin-top: 1.5rem;
}

.whatsapp-icon-link {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
}

.whatsapp-icon-link:hover {
    transform: scale(1.05);
}

.whatsapp-icon {
    font-size: 5rem;
    color: #25D366;
    margin-bottom: 0.5rem;
}

.whatsapp-contact p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Specific style for product pages to move social icons */
.product-page .social-media,
.bottle-page .social-media {
    margin-right: 150px;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
    min-width: 100%;
    box-sizing: border-box;
    height: 250px;
}

.carousel-container .prev,
.carousel-container .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1;
    display: none; /* Initially hidden, JS will show them */
}

.carousel-container .prev {
    left: 10px;
    border-radius: 50%;
}

.carousel-container .next {
    right: 10px;
    border-radius: 50%;
}

.product-carousel:hover .prev,
.product-carousel:hover .next {
    display: block; /* Show on hover */
}

/* Carousel Image Display Fix */
.product-carousel .carousel-slide img {
    display: inline-block;
}
.product-info {
    padding: 10px;
}

.product-info h3 {
    margin-top: 0;
    margin-bottom: 4px;
}


/* Customize Page Styles */
.customize-page .custom-product-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
}

.custom-product-visuals {
    flex: 1 1 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-type-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.product-choice {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s;
}

.product-choice img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-choice.active {
    border-color: var(--primary-color);
}

.custom-product-image-preview {
    border: 2px solid var(--border-color);
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    height: 450px;
}


.custom-product-image-preview img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-product-options {
    flex: 2 1 500px;
    display: flex;
    flex-direction: column;
}

.custom-product-options h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.custom-options-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.custom-option-button {
    background-color: #2a2a2a;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
}

.custom-option-button i {
    font-size: 2.2rem;
    color: var(--secondary-color);
}

.customize-page hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 1.5rem 0;
}

.size-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.size-selector label {
    font-weight: bold;
    font-size: 1.1rem;
}

.size-options {
    display: flex;
    gap: 1rem;
}

.size-btn {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.size-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    font-weight: bold;
    font-size: 1.1rem;
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.quantity-btn,
.quantity-input input[type="number"] {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    text-align: center;
}

.quantity-btn {
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.5rem 1rem;
}

.quantity-input input[type="number"] {
    width: 50px;
    font-size: 1.1rem;
    -moz-appearance: textfield; /* Firefox */
}

.quantity-input input[type=number]::-webkit-inner-spin-button, 
.quantity-input input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

.get-a-quote-button {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 1rem;
    text-align: center;
    width: 100%;
    transition: background-color 0.3s;
}

.get-a-quote-button:hover {
    background-color: var(--secondary-color);
}

@media (max-width: 768px) {
    main {
        padding-left: 0;
        padding-right: 0;
    }

    .logo {
        font-size: 2.0rem;
    }

    .header-container {
        padding: 0 60px; /* Add padding to prevent FAB overlap */
    }

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

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px; /* Reduce gap between products to a minimum */
    }

    .product-card-full-image .product-info {
        padding: 0 1rem 0.5rem; /* Add bottom padding on mobile */
    }

    body {
        padding-bottom: 80px; /* Increased padding to ensure footer is not overlapped */
    }

    .footer-container {
        justify-content: center; /* Center footer items on mobile */
    }

    .social-media {
        margin-right: 0; /* Remove the margin on mobile */
    }
    .category-buttons {
        gap: 0.5rem; /* Reduce space between buttons */
    }

    .category-buttons .category-button {
        padding: 0.4rem 0.6rem; /* Reduce padding inside buttons */
        font-size: 0.85rem; /* Reduce font size */
    }

}
/* Request a Quote Form Styles */
#quote-form {
    max-width: 600px;
    margin: 1rem auto 0;
    padding: 1rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

#quote-form .form-group {
    margin-bottom: 0.75rem;
}

#quote-form .form-row {
    display: flex;
    align-items: center; /* Vertically center align all items in the row */
    gap: 1rem;
    margin-bottom: 0.75rem;
}

#quote-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

#quote-form .form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-weight: bold;
}

#quote-form .form-group input,
#quote-form .form-group textarea,
#quote-form .form-group select {
    width: 100%;
    padding: 0.5rem;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
    box-sizing: border-box;
}

#quote-form .quantity-input {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center; /* Change from stretch to center */
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}


#quote-form .quantity-input .quantity-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch; /* Make buttons fill the height */
}

#quote-form .quantity-input .quantity-btn:hover {
    background-color: var(--secondary-color);
}

#quote-form .quantity-input input[type="number"] {
    width: 100%;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem; /* Add padding to match other inputs */
    -moz-appearance: textfield;
}

#quote-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0.5rem;
    text-align: center;
    transition: background-color 0.3s;
}

#quote-form button:hover {
    background-color: var(--secondary-color);
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* Styles for Quality Buttons on Product Images */
.carousel-container {
    position: relative; /* Make this a positioning context */
}

.quality-buttons-container {
    position: absolute;
    bottom: 4.5px; /* Position near the bottom of the image */
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
    z-index: 2; /* Ensure buttons are above the image */
}

.quality-button {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.quality-button:hover {
    background-color: rgba(42, 42, 42, 0.9);
}

.quality-button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

/* --- Shopping Cart Styles --- */

.cart-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.cart-container h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

.cart-items-container .cart-empty {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 2rem 0;
}

.cart-item-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.cart-item-quality {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0 0 0.5rem 0;
    text-transform: capitalize;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 0;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.cart-item-remove-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

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

.cart-summary {
    margin-top: 2rem;
    text-align: right;
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
}

.cart-summary p {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.checkout-button[disabled] {
    background-color: #555;
    color: #999;
    cursor: not-allowed;
}

/* Counter on Cart FAB */
.fab-cart {
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #2a2a2a;
    visibility: hidden; /* Initially hidden */
}

.cart-count.visible {
    visibility: visible;
}
/* --- Admin & Login Page Styles --- */

/* Login Page Specifics */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
}

#login-form {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#login-form h2 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

#login-form p {
    text-align: center;
    margin-bottom: 2rem;
    color: #ccc;
}

#login-form .form-group {
    margin-bottom: 1.5rem;
}

#login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

#login-form input {
    width: 100%;
    padding: 0.8rem;
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
}

#login-form button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

#login-form button:hover {
    background-color: var(--secondary-color);
}

.login-error-message {
    color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin-top: 1.5rem;
    display: none; /* Oculto por defecto */
}


/* Admin Panel Specifics */
.admin-title {
    color: #000;
    font-size: 1.8rem;
    margin: 0;
}

.admin-logout-btn {
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-logout-btn:hover {
    background-color: var(--secondary-color);
}

/* Contenedor principal del panel de admin */
.admin-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.admin-container h2 {
    color: var(--primary-color);
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Estilo para cada orden en la lista (lo usaremos en el futuro) */
.order-item {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #444;
}
/* --- Color Palette Styles (Cart) --- */
.color-picker-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #1a1a1a;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    transition: transform 0.2s, border-color 0.2s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

/* --- Update Remove Button Color --- */
.cart-item-remove-btn {
    background: none;
    border: none;
    color: var(--secondary-color); /* Changed from red to gold */
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.cart-item-remove-btn:hover {
    color: var(--primary-color); /* Added a pink hover for contrast */
}
/* --- Mobile view for Cart Items --- */
@media (max-width: 768px) {
    /* Make the whole cart item stack vertically */
    .cart-item {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
    }

    /* Make the details section full-width and stack its content */
    .cart-item-details {
        width: 100%;
        flex-direction: column; /* Stack title and form */
        align-items: stretch;   /* Make title and form full-width */
        gap: 1rem;
    }

    /* Ensure the form itself is full-width */
    .cart-customization-form {
        width: 100%;
    }

    /* Style the form rows for better mobile layout */
    .cart-customization-form .form-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 1rem;
    }
    
    .cart-customization-form .form-row label {
        font-weight: bold;
        margin-bottom: 0.2rem;
    }

    /* Make form inputs larger and easier to tap */
    .cart-item-select,
    .cart-item-quantity {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
        box-sizing: border-box; /* Important for width: 100% */
    }

    /* Justify the color palette to the start */
    .color-picker-row .color-palette {
        justify-content: flex-start;
    }
    
    /* Make the update button full-width and prominent */
    .cart-item-update-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.2rem;
    }

    /* Center the remove button at the bottom */
    .cart-item-actions {
        width: 100%;
        align-items: center;
        margin-top: 1rem;
    }
}
/* --- Reducción de Margen del Título del Carrito --- */
.cart-container h2 {
    margin-top: 0; /* Reduce el espacio arriba del título */
    margin-bottom: 1rem; /* Reduce el espacio debajo del título */
}

/* --- Rediseño del Campo de Cantidad --- */
.quantity-row .cart-item-quantity {
    background-color: transparent;
    border: 2px solid var(--secondary-color); /* Borde dorado */
    color: var(--text-color);
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    width: 70px; /* Hace el campo más pequeño */
    height: 50px;
    padding: 0.5rem;
    -moz-appearance: textfield; /* Oculta las flechas en Firefox */
}

/* Oculta las flechas en otros navegadores como Chrome, Safari, Edge */
.quantity-row .cart-item-quantity::-webkit-outer-spin-button,
.quantity-row .cart-item-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Centra el nuevo campo de cantidad en móviles */
@media (max-width: 768px) {
    .quantity-row {
        align-items: center; /* Centra el campo en su fila */
    }
}
/* --- AJUSTES FINALES DE ESPACIO EN EL CARRITO --- */

/* 1. Reduce el espacio GRANDE arriba de "Your Shopping Cart" */
.cart-container {
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* 2. Reduce el espacio debajo del nombre del producto (ej. "Shirt 1") */
.cart-item-title {
    margin-bottom: 0.5rem;
}

/* 3. Reduce el espacio debajo de "Finish your design" */
.customization-prompt {
    margin-bottom: 0.5rem;
}
/* --- Alineación del botón de Cantidad y Eliminar (Versión Corregida) --- */

/* 1. Estilo base para la fila (Desktop y Móvil) */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-row label {
    flex-grow: 0; /* No crece */
    margin-bottom: 0; /* Anula margen que causa problemas en móvil */
}

.quantity-row .cart-item-quantity {
    flex-grow: 0; /* No crece */
    width: 70px; /* Tamaño fijo */
}

.quantity-row .cart-item-remove-btn {
    background: transparent;
    border: none;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto; /* EMPUJA EL BOTÓN A LA DERECHA */
}

.quantity-row .cart-item-remove-btn:hover {
    color: #ff4d4d;
}

/* 2. Corrección VITAL para vista de teléfono */
@media (max-width: 768px) {
    /* Esto anula la regla que apila todo verticalmente, pero SÓLO para esta fila */
    .cart-customization-form .form-row.quantity-row {
        flex-direction: row !important;
    }
}
/* --- Ajuste de Ancho del Carrito en Móviles --- */
@media (max-width: 768px) {
    .cart-container {
        /* Reduce el margen exterior para que se acerque a los bordes */
        margin-left: 0.5rem;
        margin-right: 0.5rem;

        /* Reduce el relleno interior para ganar más espacio útil */
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
/* --- Estilos para Botones de Talla en el Carrito --- */

/* Contenedor de los botones de talla */
.size-options {
    display: flex; /* Alinea los botones en una fila */
    flex-wrap: nowrap; /* Evita que los botones salten a la siguiente línea */
    gap: 0.5rem; /* Espacio pequeño entre botones */
    width: 100%;
}

/* Estilo individual de cada botón de talla */
.size-btn {
    flex-grow: 1; /* Permite que los botones crezcan para ocupar el espacio disponible */
    background-color: transparent;
    border: 2px solid var(--secondary-color); /* Borde dorado por defecto */
    color: var(--text-color);
    padding: 0.75rem 0.5rem; /* Relleno (más alto que ancho) */
    border-radius: 8px; /* Bordes redondeados */
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Estilo del botón de talla cuando está activo (seleccionado) */
.size-btn.active {
    background-color: var(--primary-color); /* Fondo rosa */
    border-color: var(--primary-color); /* Borde rosa */
    color: #000; /* Texto negro */
}
/* --- Reducción de Espacios Verticales en Carrito Móvil --- */
@media (max-width: 768px) {
    /* Reduce el gap principal entre imagen y detalles */
    .cart-item {
        gap: 0.75rem; 
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    /* Reduce el gap entre el título y el formulario */
    .cart-item-details {
        gap: 0.75rem;
    }
    
    /* Reduce el margen inferior del título del producto */
    .cart-item-title {
        margin-bottom: 0.1rem;
    }

    /* Reduce el espacio entre las filas del formulario (Size, Color, Qty) */
    .cart-customization-form .form-row {
        margin-bottom: 0.5rem;
    }
}
/* --- Checkmark en la Paleta de Colores Activa --- */

/* 1. Prepara el círculo de color para posicionar el checkmark */
.color-swatch {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. Crea y estiliza el checkmark usando un pseudo-elemento */
.color-swatch.active::after {
    content: '✓';
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    /* Sombra para que se vea bien en colores claros y oscuros */
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    position: absolute; /* Asegura que no afecte el layout */
}

/* 3. Caso especial: para colores muy oscuros, el check será blanco */
.color-swatch[data-color-name="Black"].active::after,
.color-swatch[data-color-name="Charcoal"].active::after,
.color-swatch[data-color-name="Dark Heather"].active::after,
.color-swatch[data-color-name="Navy"].active::after,
.color-swatch[data-color-name="Royal"].active::after {
    color: #fff; /* Checkmark blanco */
    text-shadow: none; /* Sin sombra */
}
/* --- Estilos para el Nuevo Selector de Cantidad (+/-) --- */

.quantity-selector-container {
    display: flex;
    align-items: center;
    border: 2px solid var(--secondary-color); /* Borde dorado */
    border-radius: 8px; /* Bordes redondeados */
    background-color: #1a1a1a;
    overflow: hidden; /* Asegura que los botones no se salgan del borde */
}

.quantity-selector-container .quantity-btn {
    background-color: transparent;
    color: var(--secondary-color);
    border: none;
    cursor: pointer;
    font-size: 1.6rem; /* Símbolos +/- más grandes */
    font-weight: bold;
    padding: 0.5rem 1rem; /* Relleno generoso para facilitar el clic */
    line-height: 1; /* Mejora la alineación vertical */
    transition: background-color 0.2s, color 0.2s;
    user-select: none; /* Evita seleccionar el texto del botón al hacer clics rápidos */
}

.quantity-selector-container .quantity-btn:hover {
    background-color: var(--secondary-color); /* Efecto hover dorado */
    color: #000;
}

.quantity-selector-container .quantity-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    padding: 0 0.5rem; /* Espacio a los lados del número */
    min-width: 35px; /* Ancho mínimo para que no se mueva con 1 o 2 dígitos */
    text-align: center;
}
@media (min-width: 769px) {
    .cart-customization-form .form-row.quantity-row {
        margin-top: 1.5rem; /* Aumenta el espacio superior */
    }
}
#scrollToTopBtn {
    display: none; /* Oculta el botón al cargar la página */
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: black;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    line-height: 1;
  }
  
/* ---  Shipping and Summary Styles --- */

/* 1. Main container for the summary section */
.cart-summary {
    margin-top: 2rem;
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 1rem; /* Space between rows */
}

/* 2. Style for each row (e.g., Subtotal, Shipping Cost) */
.summary-row {
    display: flex;
    justify-content: space-between; /* Pushes text to ends */
    align-items: center;
    font-size: 1.1rem;
}

.summary-row span:first-child {
    color: #ccc; /* Lighter color for the label */
}

.summary-row span:last-child {
    font-weight: bold;
}

/* 3. Section for shipping options */
.shipping-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align "Shipping" label to the left */
    gap: 0.75rem;
    padding: 1rem 0;
}

.shipping-section > span {
    font-size: 1.1rem;
    color: #ccc;
}

.shipping-options {
    display: flex;
    width: 100%;
    gap: 1rem;
}

.shipping-option {
    flex-grow: 1; /* Make options take equal space */
    position: relative;
}

/* 4. Custom Radio Button styles */
.shipping-option input[type="radio"] {
    position: absolute;
    opacity: 0; /* Hide the actual radio button */
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.shipping-option label {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Style for the selected option */
.shipping-option input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

/* 5. Divider line */
.summary-divider {
    border: none;
    height: 1px;
    background-color: #444;
    margin: 0.5rem 0;
}

/* 6. Special styling for the final total row */
.total-row {
    margin-top: 0.5rem;
    font-size: 1.5rem; /* Larger font */
}

.total-row span:last-child {
    color: var(--secondary-color); /* Highlight the final price in gold */
}

/* 7. Responsive adjustments for mobile */
@media (max-width: 768px) {
    .shipping-options {
        flex-direction: column; /* Stack shipping options on mobile */
    }
}

/* --- Estilos para las Tarjetas de Órdenes en el Panel de Admin --- */

.order-item {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color); /* Usando el color de borde principal */
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Espacio entre las secciones de la tarjeta */
}

/* Encabezado de la orden (ID y Fecha) */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 0.75rem;
    flex-wrap: wrap; /* Para que se ajuste en pantallas pequeñas */
}

.order-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace; /* Para que el ID se vea como código */
}

.order-header .order-date {
    font-size: 0.9rem;
    color: #ccc;
}

/* Títulos de las sub-secciones (Cliente, Productos) */
.customer-details h4,
.order-products h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

/* Sección de detalles del cliente */
.customer-details p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.customer-details a {
    color: var(--secondary-color);
    text-decoration: none;
}
.customer-details a:hover {
    text-decoration: underline;
}

.customer-details address {
    font-style: normal;
    background-color: #111;
    padding: 0.5rem;
    border-radius: 4px;
    color: #ddd;
}

/* Sección de la lista de productos */
.order-items-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-items-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #111;
    padding: 0.5rem;
    border-radius: 4px;
    flex-wrap: wrap;
}

.order-items-list .item-quantity {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.order-items-list .item-desc {
    flex-grow: 1;
    font-weight: bold;
}

.order-items-list .item-specs {
    font-size: 0.85rem;
    color: #bbb;
    flex-basis: 100%; /* Ocupa toda la línea en móvil */
    margin-left: 2.5rem; /* Alineado con la descripción */
}


/* Total del pedido */
.order-total {
    text-align: right;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color); /* Color dorado para el total */
    margin-top: 1rem;
    border-top: 1px solid #444;
    padding-top: 1rem;
}

.order-total strong {
    color: var(--text-color); /* El texto "Total:" en color normal */
    font-weight: normal;
}

