@font-face {
    font-family: 'title';
    src: url('../fonts/Limelight-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Justin Moon Title - Only element using Limelight font */
.justin-moon-title {
    font-family: 'title', Arial, sans-serif;
    font-size: var(--text-xl);    /* 24px */
    line-height: 1.2;
}

/* Base font size */
html {
    font-size: 16px; /* This makes 1rem = 16px */
}

/* Type Scale Variables */
:root {
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px - base size */
    --text-md: 1.125rem;   /* 18px */
    --text-lg: 1.25rem;    /* 20px */
    --text-xl: 1.5rem;     /* 24px */
}

/* Utility Classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md { font-size: var(--text-md); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* Common Text Elements */
body {
    font-family: Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.5;
}

h1 {
    font-size: var(--text-xl);    /* 24px */
    line-height: 1.2;
    font-family: Arial, sans-serif;
}

h2 {
    font-size: var(--text-lg);    /* 20px */
    line-height: 1.3;
    font-family: Arial, sans-serif;
}

h3 {
    font-size: var(--text-md);    /* 18px */
    line-height: 1.4;
    font-family: Arial, sans-serif;
}

small {
    font-size: var(--text-sm);    /* 14px */
}

.caption {
    font-size: var(--text-xs);    /* 12px */
}

/* Reset and Base Styles */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: white;
    color: black;
}

/* Layout Components */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

main {
    padding: 2rem;
}

/* Navigation Styles */
nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: #000000;
}

nav ul li a:visited {
    color: #000000;
}

nav ul li a:hover {
    color: #666666;
    text-decoration: underline;
}

/* Active Navigation Link Styles */
nav ul li a.active {
    font-weight: bold;
    text-decoration: underline;
    color: #11557C;
}

/* Cart Navigation Count Styles */
.cart-count {
    display: inline-block;
    transition: transform 0.2s ease;
}

.cart-count.bump {
    animation: cartBump 0.3s ease-out;
}

@keyframes cartBump {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

.count-number.non-zero {
    color: red;
}

/* Product Grid Layout */
#products {
    padding: 2rem;
    text-align: center;
}

.product-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* Product Card Styles */
.product {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 1rem;
    padding: 1rem;
    width: calc(33.333% - 2rem); 
    box-sizing: border-box;
    position: relative;
}

.product img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.product h3 {
    font-size: var(--text-md);    /* 18px */
    margin: 0.5rem 0;
    font-family: Arial, sans-serif;
}

.product p {
    font-size: var(--text-base);  /* 16px */
    margin: 0.5rem 0;
}

.product .price {
    font-size: var(--text-lg);    /* 20px */
    font-weight: bold;
}

/* Product State Styles */
.product .add-to-cart:focus {
    outline: none; 
}

.product .sold-out {
    color: red;
    font-weight: bold;
}

/* Cart and Checkout Styles */
#cart-items {
    background-color: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#cart-items h2 {
    margin-top: 0;
    text-align: center;
}

/* Cart Item Styles */
.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.cart-item-details {
    display: flex;
    gap: 1rem;
}

.cart-item-text {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0;
    gap: 0.5rem;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: var(--text-md);    /* 18px */
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.cart-item-quantity,
.cart-item-subtotal {
    margin: 0;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Common Button Base Styles */
.add-to-cart,
.remove-item-button,
#checkout-button,
.load-more-btn,
.pagination-btn {
    padding: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Primary Action Buttons (Green) */
#checkout-button,
.load-more-btn {
    background-color: #28a745;
    color: white;
}

/* Secondary Action Buttons (Black/White) */
.pagination-btn {
    background: none;
    border: 1px solid #000;
    color: #000;
}

/* Danger Buttons (Red) */
.remove-item-button {
    background-color: #dc3545;
    color: white;
}

/* Add to Cart Button (Special Case) */
.add-to-cart {
    background: none;
    border: 1px solid #ddd;
}

/* Hover States */
#checkout-button:not(:disabled):hover,
.load-more-btn:not(:disabled):hover,
.add-to-cart:not(:disabled):hover,
.remove-item-button:not(:disabled):hover {
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.pagination-btn:not(:disabled):hover {
    background: #000;
    color: #fff;
}

/* Active States */
#checkout-button:active,
.load-more-btn:active,
.add-to-cart:active,
.remove-item-button:active,
.pagination-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Disabled States */
#checkout-button:disabled,
.load-more-btn:disabled,
.pagination-btn:disabled {
    background-color: #6c757d;
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

/* Special Cases */
#checkout-button {
    width: 100%;
    margin-top: 1rem;
}

.add-to-cart:active {
    background-color: #28a745;
    color: white;
}

.remove-item-button:hover {
    background-color: #c82333;
}

/* Checkout Section */
#checkout {
    margin-top: 2rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 5px;
  position: relative;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: black;
}

/* Order History Styles */
.order-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    padding: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-family: Arial, sans-serif;
}

.order-datetime {
    font-size: var(--text-sm);    /* 14px */
    color: #888;
}

.order-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.order-status.succeeded {
    background-color: #28a745;
    color: white;
}

.order-status.failed {
    background-color: #dc3545;
    color: white;
}

.order-details {
    color: #666666;
}

.order-amount {
    font-size: 1.2em;
    color: black;
    margin: 0.5rem 0;
}

.order-receipt {
    font-size: var(--text-xs);    /* 12px */
    margin: 0;
}

.order-receipt a {
    text-decoration: none;
    color: #11557C;
    transition: color 0.2s ease;
}

.order-receipt a:hover {
    color: #666666;
    text-decoration: underline;
}

/* Loading Spinner Styles */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #ddd;
    border-top: 3px solid #000000;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border-width: 2px;
    margin: 1rem auto;
}

.loading-spinner-error {
    border-top-color: #dc3545;
}

.loading-spinner-success {
    border-top-color: #28a745;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #000;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover {
    background: #000;
    color: #fff;
}

.page-number {
    font-size: 0.9rem;
}

/* Load More Button Styles */
.load-more-btn {
    padding: 1rem;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 2rem auto;
    display: block;
    transition: all 0.2s ease-in-out;
}

.load-more-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.load-more-btn:not(:disabled):hover {
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.load-more-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-more-orders {
    text-align: center;
    color: #666666;
    margin: 2rem 0;
}

/* Small loading spinner for load more button */
.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* About Page Styles */
.about-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.about-content {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 1rem;
}

.about-content h3 {
    margin: 1.5rem 0 0.5rem 0;
    color: #11557C;
}

.about-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: #28a745;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    display: block;
    width: 100%;
}

.submit-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add this to your existing CSS file */
.studio-link {
    color: #11557C; /* Match the active link color */
    text-decoration: underline; /* Underline for links */
    transition: color 0.2s ease; /* Smooth color transition */
}

.studio-link:hover {
    color: #666666; /* Change color on hover */
    text-decoration: underline; /* Keep underline on hover */
}