/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; 
    margin: 0;  
}

body {
    background-color: black;
    color: white;
    height: 100vh;
    padding: 0; /* Removes default body padding */
}

/* Color Variables */
:root {
    --primary-color: white;
    --hover-link-color: #f0f7ff;
    --scrolled-link-color: #555;
    --footer-bg-color: #222;
    --footer-text-color: white;
}

/* =========================================
   HEADER
========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    background-color: rgba(119, 149, 182, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    z-index: 10;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
    background-color: rgba(0,123,255,0.2);
    padding: 5px 0;
}

.logo {
    text-decoration: none;
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.logo.scrolled {
	color: black;
}

.nav {
    width: 100%;
}

.nav-bar {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 37.5px;
}

.nav-links a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.325s cubic-bezier(0.25,0.8,0.25,1);
}

.nav-links a.active {
    color: var(--active-link-color);
}

.nav-links a:hover,
.nav-links a.active:hover {
    color: var(--hover-link-color);
}

.header.scrolled .nav-links a {
    color: var(--scrolled-link-color);
}

.header.scrolled .nav-links a.active {
    color: var(--active-scrolled-color);
}

.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a.active:hover {
    color: var(--scrolled-hover-color);
    transition: color 0.3s ease-in-out;
}

/* =========================================
   CART & SIDEBAR
========================================= */
.cart-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.cart-icon {
    max-width: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 10;
    padding: 0;
	
	/* === Remove unwanted square or pseudo-elements === */
	background: none !important;
    border: none !important;
    box-shadow: none !important;
	transition: transform 0.3s ease;
}

.cart-icon::before,
.cart-icon::after {
    content: none !important;
}

.cart-icon:hover,
.cart-icon:focus {
    transform: scale(1.1);
    color: inherit; /* Matches text/icon color; adjust if needed */
    outline: none;
}

.cart-icon.active {
    background-color: rgba(255,255,0,0.0);
    border-radius: 5px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #555;
    color: white;
	font-family: Arial, sans-serif;
    font-size: 0.7rem; /* smaller badge text */
    font-weight: 700;
    line-height: 1;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 2px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.36s cubic-bezier(.22,.9,.34,1), opacity 0.28s ease;
}

.cart-badge.active {
    transform: scale(1);
    opacity: 1;
    animation: bounceBadge 0.45s ease;
}

@keyframes bounceBadge {
    0%,100%{transform:scale(1);}
    30%{transform:scale(1.3);}
    50%{transform:scale(0.9);}
    80%{transform:scale(1.1);}
}

/* Sidebar */
.shopping-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
    padding: 20px;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    z-index: 100;
    border-left: 3px solid #007bff1a;
    backdrop-filter: blur(4px);
}

.shopping-sidebar.open { transform: translateX(0); }

.shopping-sidebar .close {
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
	outline: none; /* Remove focus outline */
    border: none;  
    background: transparent;
    color: black;
	cursor: pointer;
}

#shoppingSidebar .close:hover {
    color: #161616;
}

.sidebar-header { font-size: 1.25em; color: black; }
.sidebar-paragraph { font-size: 1em; color: black; }

#cartContents {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-top: 20px;
}

.cart-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    min-height: 70px; /* enough for 55px image + padding */
    max-height: 120px; /* prevents overly tall items if text wraps */
    min-width: 180px; /* prevents shrinking too small in a row layout */
    max-width: 100%; /* allows flexibility for container */
}

.cart-item-left {
  display: flex;
  align-items: center;
  gap: 10px; /* space between thumbnail and info */
  flex: 1; /* allows info to grow */
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    transition: width 0.3s ease, height 0.3s ease, font-size 0.3s ease;
}

.cart-item-left-mid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px; /* space between thumbnail and info */
  flex: 1; /* allows info to grow */
}

.cart-item-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
	gap: 2px;
    font-size: 13px;
    color: #111;
    width: 100%;
    align-items: center;
    transition: font-size 0.3s ease;
}

.cart-item-price {
	display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
	gap: 2px;
    font-size: 13px;
    color: #111;
    width: 100%;
    align-items: center;
    transition: font-size 0.3s ease;
}

.cart-item-right-mid {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* The actual number in between the + and - buttons */
.cart-item-qty {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    color: #111;
}

/* + and - Buttons */
.qty-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0;
    line-height: 1;
	padding: 0;
    background: #f0f0f0;
    color: black;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qty-btn:hover { 
    background-color: #dddddd;
    color: #white;
}

.cart-item-right {
  display: flex;
  align-items: center;
  gap: 10px; /* space between qty controls and trash */
}

.remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #E1E1E1;
    margin-left: -7.5px;
    align-self: center;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.remove-btn:hover { color: #b02a37; transform: scale(1.1); }
.remove-btn:focus { outline: 2px solid #007bff; outline-offset: 2px; }

.delete-confirmation {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 300;
    display: none;
}

.delete-confirmation p { margin-bottom: 15px; font-size: 14px; color: black; }

.delete-confirmation button {
    margin-right: 10px; padding: 5px 12px; border-radius: 5px; border: none; cursor: pointer; font-size: 14px;
}

.delete-confirmation .confirm-btn { background-color: #28a745; color: white; }
.delete-confirmation .cancel-btn { background-color: #555; color: white; }

body.modal-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 250;
}

/* Checkout button */
.shopping-sidebar .checkout-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 20px auto 0 auto;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.shopping-sidebar .checkout-btn:hover { background-color: #0056b3; transform: scale(1.02); }
.shopping-sidebar .checkout-btn:disabled { background-color: #ccc; cursor: not-allowed; transform: none; }

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.line {
    height: 3px;
    width: 25px;
    background: white;
    margin: 3px 0;
}

.gallery {
    display: grid; /* Enables grid layout */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Responsive columns */
    gap: 20px; /* Spacing between items */
    padding: 20px; /* Padding around the gallery for spacing from edges */
    margin: 0 auto; /* Centers the gallery */
    width: 90%; /* Responsive width */
    max-width: 1200px; /* Maximum width for larger screens */
    margin-top: 120px; /* Add top margin to push down the gallery */
}

.gallery img {
    width: 100%; /* Ensures images fill their grid area */
    height: 200px; /* Maintain aspect ratio */
    max-height: 200px; /* Set a max height for the images */
    object-fit: cover; /* Maintains aspect ratio while filling the area */
    border-radius: 8px; /* Optional: adds rounded corners */
    cursor: pointer; /* Change cursor to pointer on hover */
}

/* Lightbox Styles */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: hidden; /* Hide overflow */
    background-color: rgba(0, 0, 0, 0.8); /* Black background with transparency */
}

.lightbox-content {
    position: relative;
    margin: auto;
    top: 10%;
    width: 80%; /* Content width */
    max-width: 700px; /* Max width */
}

.lightbox-image {
    width: auto; /* Allow image to adjust width */
    max-width: 100%; /* Ensure image doesn't exceed lightbox width */
    height: auto; /* Maintain aspect ratio */
    max-height: 80vh; /* Adjust max height to fit within the viewport */
    display: block; /* Make image a block element */
    margin: auto; /* Center the image */
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Background color on hover */
}

/* =========================================
   FOOTER
========================================= */
footer { display: flex; justify-content: center; background-color: var(--footer-bg-color); padding: 20px; color: var(--footer-text-color); width: 100%; min-height: 60px; max-height: 120px; overflow: hidden; }
footer p { text-decoration: none; color: white; text-align: center; }

.social-icon { margin-left: 15px; margin-top: 1.5px; }

.terms-icon { color: #a28564; }
.terms-icon:hover { color: #917350; transition: color 0.3s; transform: scale(1.1); }

.privacy-policy-icon { color: #75A264; transition: color 0.3s; }
.privacy-policy-icon:hover { color: #629150; transition: color 0.3s; transform: scale(1.1); }

.purchase-policy-icon { color: #5F7BE0; transition: color 0.3s; }
.purchase-policy-icon:hover { color: #4562cb; transition: color 0.3s; transform: scale(1.1); }

.youtube-icon { color: #c74444; transition: color 0.3s; }
.youtube-icon:hover { color: #AB3131; transition: color 0.3s; transform: scale(1.1); }

.instagram-icon { color: #9042DF; transition: color 0.3s; }
.instagram-icon:hover { color: #7e2ccb; transition: color 0.3s; transform: scale(1.1); }

/* Responsive adjustments */
@media (max-width: 600px) {
    .nav-bar {
        gap: 17.5px;
    }

    .nav-links {
        margin: 0 5px;
    }

    .gallery {
        gap: 10px; /* Reduced spacing in smaller viewports */
        padding: 10px; /* Less padding for smaller screens */
        margin-top: 80px; /* Slightly less top margin */
    }

    .gallery img {
        max-height: 150px; /* Reduced height for smaller screens */
    }

    .social-icon {
        margin-left: 15px; /* Space between icons */
        margin-top: 2.5px;
        font-size: 0.9em;
        text-decoration: none;
    }
}

@media (max-width: 480px) {
    .gallery {
        padding: 20px; /* Even less padding for very small screens */
        margin-top: 120px; /* Adjust for even smaller screens */
        gap: 20px; /* Increase spacing between items for mobile view */
    }

    .gallery img {
        height: auto; /* Maintain aspect ratio while limiting height */
        max-height: 120px; /* Specific smaller max height for very small screens */
    }

}

