:root {
	--primary-color: #4A90E2;
	--primary-color-dark: #1976D2;
	--primary-color-darker: #1565C0;
	--primary-rgb: 74, 144, 226;
	--secondary-color: #FFA726;
	--background-color: #E8F4FF;
	--text-color: #2c3e50;
	--header-font: 'Cabin Sketch', cursive;
	--body-font: 'Inter', Arial, sans-serif;
	--shadow: 0 2px 4px rgba(0,0,0,0.1);
	--card-bg: rgba(255, 255, 255, 0.9);
}

/* Red Theme - for tomspaperplanes.net */
body.theme-red {
	--primary-color: #E24A4A;
	--primary-color-dark: #D32F2F;
	--primary-color-darker: #C62828;
	--primary-rgb: 226, 74, 74;
	--background-color: #FFE8E8;
}

/* Green Theme - for subdomain.tomspaperplanes.com */
body.theme-green {
	--primary-color: #4CAF50;
	--primary-color-dark: #388E3C;
	--primary-color-darker: #2E7D32;
	--primary-rgb: 76, 175, 80;
	--background-color: #E8FFE8;
}

body {
	font-family: var(--body-font);
	line-height: 1.6;
	background-color: var(--background-color);
	background-image: 
		linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(255,255,255,0.2) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.2) 75%),
		linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.2) 75%);
	background-size: 20px 20px;
	background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
	color: var(--text-color);
	margin: 0;
	padding: 0;
	min-height: 100vh;
	position: relative;
}

/* Add floating paper planes animation */
@keyframes float {
	0% { transform: translateY(0) rotate(0deg); }
	50% { transform: translateY(-20px) rotate(5deg); }
	100% { transform: translateY(0) rotate(0deg); }
}

header {
	background-color: rgba(255, 255, 255, 0.85);
	background-image: 
		linear-gradient(135deg, rgba(74, 144, 226, 0.05) 25%, transparent 25%),
		linear-gradient(225deg, rgba(74, 144, 226, 0.05) 25%, transparent 25%),
		linear-gradient(45deg, rgba(74, 144, 226, 0.05) 25%, transparent 25%),
		linear-gradient(315deg, rgba(74, 144, 226, 0.05) 25%, transparent 25%);
	background-position: 10px 0, 10px 0, 0 0, 0 0;
	background-size: 20px 20px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
	padding: 0.75rem 1rem;
	position: sticky;
	top: 0;
	z-index: 100;
}

.grid {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	max-width: 100%;
	padding: 0 2rem;
}

.center {
	text-align: center;
	font-family: var(--header-font);
	font-size: 2rem;
	color: var(--primary-color);
	padding: 0 1rem;
	text-shadow: 2px 2px 4px rgba(74, 144, 226, 0.1);
	position: relative;
}

.right {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.left a, .right a {
	color: var(--text-color);
	text-decoration: none;
	font-size: 1.5rem;
	transition: color 0.3s ease;
	display: flex;
	align-items: center;
}

.left a:hover, .right a:hover {
	color: var(--primary-color);
}

p {
	max-width: 800px;
	margin: 1rem auto;
	padding: 0 1rem;
	text-align: center;
	line-height: 1.5;
}

.hero {
    background: var(--card-bg);
    padding: 1.25rem;
    margin: 1rem auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

.hero p {
    margin: 0.75rem auto;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 800px;
    color: var(--text-color);
    opacity: 0.9;
}

table {
	width: 100%;
	max-width: 1200px;
	margin: 2rem auto;
	border-collapse: collapse;
	background: white;
	box-shadow: var(--shadow);
	border-radius: 8px;
	overflow: hidden;
}

th {
	background: var(--primary-color);
	color: white;
	padding: 0.5rem;
	font-weight: 600;
	font-size: 0.9rem;
}

td {
	padding: 1rem;
	border-bottom: 1px solid #eee;
}

.button {
	display: inline-block;
	padding: 0.8rem 1.5rem;
	font-size: 1rem;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	color: white;
	background-color: var(--primary-color);
	border: none;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	margin-left: 0;
}

.button:hover {
	background-color: var(--primary-color-dark);
	transform: translateY(-2px);
}

.button:active {
	background-color: var(--primary-color-darker);
	transform: translateY(1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge:after {
	content: attr(value);
	font-size: 0.75rem;
	color: white;
	background: #ff5252;
	border-radius: 50%;
	padding: 0.25rem 0.5rem;
	position: relative;
	left: -8px;
	top: -10px;
}

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

a:hover {
	color: var(--primary-color-dark);
}

ul {
	padding: 0;
}

ul li {
	display: inline-block;
	margin-right: 10px;
	color: #778899;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--header-font);
	color: var(--primary-color);
	text-shadow: 2px 2px 4px rgba(74, 144, 226, 0.1);
	text-align: center;
	margin: 1.5rem 0;
}

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: 1.1rem;
}

/* Update specific heading overrides */
.success-header h2 {
	font-size: 2rem;
	margin: 1rem 0;
}

.order-items h3 {
	margin-top: 0;
	margin-bottom: 1rem;
}

#items_table h3 {
	font-size: 1.75rem;
	margin: 0 0 1.5rem 0;
}

.product-detail h1 {
	margin-bottom: 2rem;
}

.right {
	text-align: right;
}

.hidden {
	display: none;
}

.center {
	text-align: center;
}

.right {
	text-align: right;
}

.hidden {
	display: none;
}

.youtube-thumbnail {
	position: relative;
	display: block;
	max-width: 280px;
	width: 100%;
	margin: 1rem auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.youtube-thumbnail:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.youtube-thumbnail:hover img {
	transform: scale(1.05);
}

.play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	background-color: rgba(33, 150, 243, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
}

.play-button i {
	color: white;
	font-size: 24px;
	margin-left: 4px;
}

.youtube-thumbnail:hover .play-button {
	background-color: var(--primary-color);
}

.video-caption {
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
    font-style: italic;
    opacity: 0.9;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px) rotate(2deg);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.2);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    gap: 0.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

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

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    text-align: center;
}

.product-action {
    margin-top: auto;
}

.sale-badge {
    background-color: #ff5252;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.product-id {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* Hide the old table styles since we're not using them anymore */
#myTableData table {
    display: none;
}

.success-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
}

.success-header {
    text-align: center;
    margin-bottom: 2rem;
}

.success-header i {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.success-header h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin: 1rem 0;
}

.order-summary {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-family: var(--body-font);
}

.order-items {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 8px;
    align-items: center;
}

.order-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-item-name {
    font-weight: 600;
    color: var(--text-color);
}

.order-item-category {
    font-size: 0.9rem;
    color: #666;
}

.order-item-quantity {
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
}

.order-item-price {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    min-width: 80px;
}

.order-item b {
    color: #ff5252;
    font-weight: 600;
    margin-left: 0.5rem;
}

.success-actions {
    text-align: center;
    margin-top: 2rem;
}

.success-actions .button {
    min-width: 200px;
}

.debug-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.debug-toggle {
    width: 100%;
    padding: 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.debug-toggle:hover {
    background: #e0e0e0;
}

.debug-toggle.active {
    background: #e0e0e0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.debug-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
    margin-top: -8px;
}

.debug-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.debug-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

.product-detail {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.product-detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin: 0 auto;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.product-image-container {
    text-align: center;
}

.product-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-info-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-info-container p {
    text-align: left;
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

#productDetails {
    font-size: 1.1rem;
    line-height: 1.6;
}

#productDetails b {
    color: var(--text-color);
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.product-actions .button {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.9rem;
}

.product-actions .button.secondary {
    background-color: #e0e0e0;
    color: var(--text-color);
}

.product-actions .button.secondary:hover {
    background-color: #d0d0d0;
}

s {
    color: #999;
    margin-right: 0.5rem;
}

.sale-text {
    color: #ff5252;
    font-weight: 600;
    margin-top: 0.5rem;
    display: block;
}

/* Remove unused cart styles */
.cart-link, .cart-link i.badge, .clear-cart-btn {
	display: none;
}

.cart-item-actions {
	display: none;
}

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

.cart-actions .button {
    min-width: 160px;
}

.cart-actions .button.secondary {
    background-color: #ff4444;
    color: white;
}

.cart-actions .button.secondary:hover {
    background-color: #ff2222;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.contact-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: rgba(33, 150, 243, 0.1);
}

/* Add paper plane icon animations */
.nav-brand .fa-paper-plane {
    animation: float 3s ease-in-out infinite;
}

.nav-brand .fa-paper-plane:first-child {
    animation-delay: -1.5s;
}

/* Update hero section */
.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
}

.login-container {
    display: flex;
    align-items: center;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    display: none;
    position: relative;
}

.profile-dropdown.active {
    display: block;
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 0.75rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.profile-dropdown:hover .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.profile-info {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.5rem;
}

.user-email {
    font-size: 0.9rem;
    color: var(--text-color);
    text-align: center;
    word-break: break-all;
}

.logout-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #ff4444;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.logout-btn i {
    font-size: 1rem;
}

.logout-btn:hover {
    background-color: #fff1f1;
    color: #ff2222;
}

@media (max-width: 768px) {
    .profile-menu {
        min-width: 160px;
    }
    
    .user-email {
        font-size: 0.8rem;
    }
}

/* Remove old profile styles */
.user-profile,
.profile-section,
.standalone-logout {
    display: none;
}

/* Navigation Bar Styles */
.main-nav {
    max-width: 1200px;
    margin: 0 auto;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--header-font);
    font-size: 1.75rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(74, 144, 226, 0.1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-right .admin-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-right .admin-link:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-right .admin-link i {
    font-size: 1rem;
}

.nav-right .admin-link i.fa-user-shield {
    color: var(--primary-color);
}

.nav-right .admin-link i.fa-cog {
    font-size: 0.85rem;
    margin-left: -0.25rem;
}

.login-container {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 1rem;
    position: relative;
}

.nav-link .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff5252;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.nav-link .cart-badge:empty {
    display: none;
}

@media (max-width: 768px) {
    .nav-container {
        gap: 1rem;
    }

    .nav-brand {
        font-size: 1.5rem;
    }

    .nav-brand i {
        font-size: 1.25rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .login-container {
        margin-left: 0.5rem;
    }
}

@media (max-width: 640px) {
    .nav-brand span {
        display: none;
    }

    .nav-brand i:last-child {
        display: none;
    }
}

.nav-link.has-dropdown {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link.has-dropdown:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.cart-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: -0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    padding: 0.5rem;
    min-width: 180px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 10000;
    overflow: visible;
}

.nav-link.has-dropdown:hover .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.cart-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color) !important;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    width: calc(100% - 2px);
    margin: 1px;
    cursor: pointer;
    visibility: visible !important;
    opacity: 1 !important;
}

.cart-dropdown-item:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    transform: translateX(2px);
    box-shadow: none;
}

.cart-dropdown-item.danger {
    color: #ff4444;
    margin-top: 0.25rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.cart-dropdown-item i {
    font-size: 1.1rem;
    display: inline-block;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.cart-dropdown-item.hidden {
    display: none;
}

.products-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 0.75rem;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-link.has-dropdown:hover .products-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.products-dropdown-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: var(--background-color);
}

.product-preview:hover {
    background-color: rgba(74, 144, 226, 0.1);
    transform: translateX(2px);
}

.product-preview img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.product-preview-info {
    flex: 1;
    min-width: 0;
}

.product-preview-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-preview-price {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.products-dropdown-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    margin-top: 0.5rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    font-weight: 500;
    justify-content: center;
    transition: all 0.2s ease;
}

.products-dropdown-footer:hover {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .products-dropdown {
        left: 0;
        transform: translateX(0) translateY(-5px);
        min-width: 260px;
    }

    .nav-link.has-dropdown:hover .products-dropdown {
        transform: translateX(0) translateY(0);
    }
}

.cart-items {
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: separate;
    border-spacing: 0;
}

.cart-items thead {
    background: var(--background-color);
}

.cart-items th {
    background: transparent;
    color: #666;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.cart-items td {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.05);
    vertical-align: top;
}

.cart-items tr:last-child td {
    border-bottom: none;
}

.cart-items tbody tr {
    transition: background-color 0.2s ease;
}

.cart-items tbody tr:hover {
    background-color: rgba(74, 144, 226, 0.02);
}

.cart-items .product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cart-items .product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    margin-bottom: 0.25rem;
    display: block;
}

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

.cart-items .product-category {
    font-size: 0.85rem;
    color: #666;
}

.cart-items .price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.cart-items .quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 0.25rem;
}

.cart-items .quantity button {
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-items .quantity button:hover {
    color: var(--primary-color);
}

.cart-items .quantity input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 0.95rem;
    padding: 0.25rem;
    -moz-appearance: textfield;
}

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

.cart-items .total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.cart-items .remove-btn {
    color: #ff4444;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.cart-items .remove-btn:hover {
    opacity: 1;
    background-color: #fff1f1;
    transform: scale(1.05);
}

.cart-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 400px;
    margin: 2rem auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-size: 1rem;
    color: var(--text-color);
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid rgba(74, 144, 226, 0.05);
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    border-top: 2px solid rgba(74, 144, 226, 0.1);
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-bottom: none;
}

.promo-code {
    max-width: 400px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
}

.promo-code input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.promo-code input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.cart-actions {
    max-width: 400px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
}

.cart-actions .button {
    flex: 1;
    justify-content: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.cart-actions .button.secondary {
    background-color: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
}

.cart-actions .button.secondary:hover {
    background-color: #ff4444;
    color: white;
}

@media (max-width: 768px) {
    .cart-items th:nth-child(2),
    .cart-items td:nth-child(2) {
        display: none;
    }

    .cart-items td {
        padding: 1rem;
    }

    .cart-actions {
        flex-direction: column;
    }

    .promo-code {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cart-items th:nth-child(3),
    .cart-items td:nth-child(3) {
        display: none;
    }

    .cart-items .product-info {
        gap: 0.25rem;
    }

    .cart-items .product-name {
        font-size: 1rem;
    }
}

.cart-header {
    background-color: #f8f9fa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    color: #6c757d;
}

.cart-header th {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.cart-row {
    border-bottom: 1px solid #dee2e6;
}

.cart-row td {
    padding: 1rem;
    vertical-align: middle;
}

.product-col {
    width: 30%;
}

.price-col, .quantity-col, .total-col {
    width: 18%;
}

.action-col {
    width: 8%;
    text-align: right;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.product-details {
    flex-grow: 1;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    transition: all 0.2s;
}

.quantity-btn:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 24px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background-color: #fff5f5;
}

@media (max-width: 768px) {
    .cart-header {
        display: none;
    }
    
    .cart-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .product-col {
        grid-column: 1 / -1;
        width: 100%;
    }
    
    .cart-item-image {
        width: 36px;
        height: 36px;
    }
    
    .price-col, .quantity-col {
        display: flex;
        align-items: center;
    }
    
    .price-col::before, .quantity-col::before, .total-col::before {
        content: attr(data-label);
        font-weight: 500;
        margin-right: 0.5rem;
        color: #6c757d;
    }
    
    .action-col {
        grid-column: 2;
        grid-row: 1;
    }

    .product-info {
        gap: 0.5rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
}

.availability {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

.availability.in-stock {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.availability.low-stock {
    background-color: #fff3e0;
    color: #ef6c00;
}

.availability.out-of-stock {
    background-color: #ffebee;
    color: #c62828;
}

.availability.members-only {
    background-color: #e3f2fd;
    color: #1565c0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.availability.members-only:hover {
    background-color: #bbdefb;
}

.product-card.members-only:not(.user-logged-in) .product-actions {
    display: none;
}

.product-card.members-only:not(.user-logged-in) .product-price {
    filter: blur(4px);
    user-select: none;
}

.members-only-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border-radius: 12px;
    pointer-events: none; /* Allow clicks to pass through to links underneath */
    z-index: 5; /* Ensure the overlay is above other elements */
}

.product-card.members-only:not(.user-logged-in):hover .members-only-overlay {
    opacity: 1;
    visibility: visible;
}

/* Make only the button in the overlay clickable */
.members-only-overlay .button {
    pointer-events: auto;
}

.members-only-overlay .message {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    color: #0066cc;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
    max-width: 100%;
}

.members-only-overlay .button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.members-only-message {
    background-color: #e8f4ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    color: #0066cc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.members-only-message .button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.members-only-message .button:hover {
    background-color: #0055aa;
}

.blurred-price {
    filter: blur(3px);
    color: #999;
    transition: all 0.3s;
    cursor: pointer;
}

.blurred-price:hover {
    filter: blur(5px);
}

body.members-only-product:not(.user-logged-in) .product-price {
    position: relative;
}

body.members-only-product:not(.user-logged-in) .product-price::after {
    content: "Sign in to view price";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    font-size: 0.9rem;
    color: #0066cc;
    cursor: pointer;
}

.highlight-login {
    animation: pulse 1s infinite;
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

.product-link {
    position: relative;
    z-index: 2; /* Ensure links are above the overlay */
}

/* Make the product card cursor a pointer to indicate it's clickable */
.product-card {
    cursor: pointer;
}

/* But keep the default cursor for buttons */
.product-card button {
    cursor: pointer;
}

/* Hide product title and price when hovering over a members-only product */
.product-card.members-only:not(.user-logged-in):hover .product-title,
.product-card.members-only:not(.user-logged-in):hover .product-price {
    opacity: 0;
    visibility: hidden;
}

/* Ensure the product title is visible by default */
.product-title {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.members-only-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border-radius: 12px;
    pointer-events: none; /* Allow clicks to pass through to links underneath */
    z-index: 5; /* Ensure the overlay is above other elements */
}

/* Ensure the availability badge remains visible when hovering over a members-only product */
.product-card.members-only:not(.user-logged-in):hover .availability {
    opacity: 1;
    visibility: visible;
    z-index: 6; /* Above the overlay */
}
  