* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background-color: #1a1a1a; */
    color: #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-main {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        padding: 0 10px 20px 10px;
    }

.nav-main li .cta-button {
    margin: 0 20px 0 20px;
    white-space: nowrap;
 }

.nav-main li, .nav-main a {
    list-style-type: none;
}

.nav-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 20px;
    list-style-type: none;
}

.nav-footer li a {
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    /* background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%); */
    color: #fff;
    border-bottom: 2px solid #e53230;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}

header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

.upload-link {
    color: #e53230;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 15px;
    border: 1px solid #e53230;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.upload-link:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e53230;
    border-color: #e53230;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.sidebar {
    width: 280px;
    background: #252525;
    border-right: 2px solid #e53230;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 212, 255, 0.1);
}

.templates-section,
.controls-section {
    margin-bottom: 30px;
}

.sidebar h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #e53230;
    border-bottom: 2px solid #e53230;
    padding-bottom: 10px;
}

.template-group {
    margin-bottom: 20px;
}

.template-group-title {
    font-size: 36px;
    font-weight: 600;
    color: #7f7a7a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 8px;
    padding-left: 5px;
    border-left: 2px solid #404040;
}

.template-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #404040;
    border-radius: 6px;
    background: #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.template-btn:hover {
    border-color: #e53230;
    background-color: #2a2a2a;
    color: #e53230;
}

.template-btn.active {
    border-color: #e53230;
    background-color: #e53230;
    color: #1a1a1a;
}

.template-title h4 {
    font-size: 14px;
    color: #ff0000;
    text-align: center;
    margin-top: 5px;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #b0b0b0;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #404040;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: inherit;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.control-group input[type="text"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #e53230;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.control-group input[type="color"] {
    width: 100%;
    height: 35px;
    border: 1px solid #404040;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 8px;
}

.control-group input[type="range"] {
    width: 70%;
    margin-right: 8px;
}

.toggle-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #404040;
    border-radius: 4px;
    background: #1a1a1a;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.mode-btn:hover {
    border-color: #e53230;
    color: #e53230;
}

.mode-btn.active {
    border-color: #e53230;
    background-color: #e53230;
    color: #1a1a1a;
}

#fontSizeLabel {
    font-size: 12px;
    color: #808080;
}

.download-btn,
.reset-btn,
.upload-btn,
.fill-all-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn {
    background-color: #e53230;
    color: white;
    margin-bottom: 10px;
}

.upload-btn:hover {
    background-color: #e53230;
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.download-btn {
    background-color: #e53230;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 700;
}

.download-btn:hover {
    background-color: #e53230;
    /* transform: translateY(-2px); */
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.reset-btn {
    background-color: #d9534f;
    color: white;
}

.reset-btn:hover {
    background-color: #e53230;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 83, 79, 0.4);
}

.fill-all-btn {
    background-color: #7b68ee;
    color: white;
    margin-bottom: 10px;
}

.fill-all-btn:hover {
    background-color: #8a77ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.4);
}

.canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%); */
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 0;
}

/* Navigation buttons for multi-sheet templates */
.sheet-nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: rgba(231, 76, 60, 0.05);
    color: #1a1a1a;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-weight: bold;
}

.sheet-nav-btn:hover {
    background-color: #e53230;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.05);
}

.sheet-nav-btn:active {
    transform: scale(0.95);
}

.sheet-nav-prev {
    left: 20px;
}

.sheet-nav-next {
    right: 20px;
}

/* Sheet header indicator */
.sheet-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 212, 255, 0.1);
    border: 2px solid #e53230;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #e53230;
    z-index: 50;
}

.papers-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.papers-container.single-sheet {
    gap: 0;
}

.papers-container.vertical-sheets {
    flex-direction: column;
    gap: 20px;
}

/* Paper - size determined by template */
.paper {
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: absolute;
    overflow: hidden;
    cursor: crosshair;
    flex-shrink: 0;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    left: calc(50% - 140px);
    top: 50%;
    transform: translate(-50%, -50%);
}

.paper-element {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: white;
    padding: 12px;
    box-sizing: border-box;
    background-clip: padding-box;
    overflow: hidden;
}

.image-inner {
    cursor: grab;
    user-select: none;
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
}

.image-inner:active {
    cursor: grabbing;
}

.delete-photo-btn {
    transition: all 0.2s ease;
}

.delete-photo-btn:hover {
    background-color: rgba(255, 0, 0, 1) !important;
    transform: scale(1.1);
}

.delete-photo-btn:active {
    transform: scale(0.95);
}

.grid-overlay {
    position: absolute;
    pointer-events: none;
}

.cut-line {
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.bleed-area {
    border: 2px dashed rgba(255, 68, 68, 0.6);
    box-sizing: border-box;
}

.safe-zone {
    border: 1px dashed rgba(68, 68, 255, 0.6);
    box-sizing: border-box;
}

.photo-label {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    font-family: monospace;
    user-select: none;
}

.text-banner {
    position: absolute;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: white;
    font-family: 'Courier New';
    font-size: 16px;
    font-weight: normal;
    color: #000;
    overflow: hidden;
    word-wrap: break-word;
    padding: 3px;
    line-height: 1.0;
    white-space: pre;
    text-align: center;
}

.socials {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    padding: 20px;
}

.social-icon {
    max-width: 350px;
    padding: 10px 50px 10px 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }
    
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 200px;
        padding: 15px;
    }

    .canvas-area {
        padding: 20px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e53230;
}
/* Calendar Element Styling */
.calendar-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.calendar-container div {
    overflow: hidden;
    word-wrap: break-word;
}

/* ===== UPLOAD PAGE STYLES ===== */

.upload-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100%;
    background-color: white;
}

.upload-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    color: #7f7a7a;
    border-bottom: 3px solid #e53230;
    padding-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.upload-header h1 {
    font-size: 36px;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-header p {
    font-size: 16px;
    opacity: 0.8;
    color: #e53230;
}

.upload-main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    place-items: center;
}

.upload-main.preview-active {
    max-width: none;
    overflow: visible;
}

/* ===== PRODUCT PAGE STYLES ===== */
.product-page .upload-main {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.product-page .product-detail {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    border: 2px solid #e53230;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    color: #333;
}

.product-page .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    position: relative;
    isolation: isolate;
}

.product-page .product-preview-large {
    position: relative;
    z-index: 1;
}

.product-page .product-info-detail {
    position: relative;
    z-index: 30;
}

.product-page .photo-editor-controls {
    position: relative;
    z-index: 35;
}

.product-page .product-preview-card {
    background: linear-gradient(135deg, #e53230 0%, #9c1a20 100%);
    border-radius: 12px;
    padding: 20px;
    /* min-height: 320px; */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-page .product-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
}

.product-page .product-preview-grid.product-preview-grid-polaroid {
    grid-template-columns: repeat(3, 1fr);
    width: 75%;
    height: 85%;
}

.product-page .product-preview-grid > div {
    background: white;
    border-radius: 6px;
    opacity: 0.85;
}

.product-page .product-preview-bottom-bar {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    height: 80px;
    background: white;
    opacity: 0.3;
    border-radius: 2px;
}

.product-page .product-info-detail h1 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #333;
}

.product-page .product-info-detail p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.product-page .size-selection {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.product-page .size-selection label {
    display: block;
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.product-page .size-selection select {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    border: 2px solid #e53230;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    color: #333;
}

.product-page .price-display {
    margin-bottom: 20px;
    text-align: right;
}

.product-page .price-display.price-right {
    text-align: right;
}

.product-page .price-display .price-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.product-page .price-display .price-value {
    font-size: 2em;
    font-weight: 700;
    color: #e53230;
    margin: 0;
}

.product-page .features-panel {
    background: #fff0f0;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #e53230;
}

.product-page .features-panel h3 {
    margin-bottom: 15px;
    color: #333;
}

.product-page .features-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-page .features-panel li {
    padding: 8px 0;
    color: #666;
}

.product-page .product-action {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    padding: 16px 18px;
    background: #e53230;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    text-align: center;
    transition: background 0.3s ease;
}

.product-page .product-action.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.product-page .product-action:hover {
    background: #d12a23;
}

.product-page .back-link {
    margin-top: 20px;
    text-align: center;
}

.product-page .back-link a {
    color: #e53230;
    text-decoration: none;
    font-weight: 600;
}

@media (min-width: 900px) {
    .product-page .product-detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-page .product-preview-card {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    .product-page .upload-main {
        padding: 20px;
    }

    .product-page .product-detail {
        padding: 20px;
    }

    .product-page .product-detail-grid {
        gap: 20px;
    }

    .product-page .product-preview-card {
        min-height: 260px;
    }

    .product-page .product-preview-grid.product-preview-grid-polaroid {
        width: 100%;
    }

    .product-page .product-info-detail {
        padding: 0;
    }
}

@media (min-width: 481px) and (max-width: 900px) {
    .product-page .product-preview-card {
        min-height: clamp(300px, 52vw, 430px);
        overflow: hidden;
    }

    .product-page .product-preview-card > img {
        inset: 20px;
        width: calc(100% - 40px) !important;
        height: calc(100% - 40px) !important;
        max-width: none;
        max-height: none;
        transform: none;
        /* object-fit: contain; */
    }
}

/* ===== USER INFO SCREEN ===== */

.user-info-screen {
    /* display: flex; */
    max-width: fit-content;
}

.user-info-card {
    /* display: flex; */
    /* flex-direction: column; */
    /* justify-content: center; */
    background: #7f7a7a;
    border: 2px solid #e53230;
    border-radius: 12px;
    padding: 40px;
    /* max-width: fit-content; */
    /* width: 100%; */
}

.user-info-card h2 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.user-info-card > p {
    font-size: 14px;
    color: #000;
    text-align: center;
    margin-bottom: 30px;
}

#userInfoForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #000;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 6px;
    color: #000;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #e53230;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.form-group input::placeholder {
    color: #7f7a7a;
}

.form-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 20px 5px 20px 5px;
}

.form-buttons .btn-back {
    flex: 1;
}

.form-buttons .btn {
    flex: 1;
}

/* ===== TEMPLATE SELECTION SCREEN ===== */

.template-section {
    padding-top: 40px;
}

.section-title {
    font-size: 18px;
    color: #e53230;
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 2px solid #e53230; */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.template-option {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
}

.template-option:hover {
    border-color: #e53230;
    /* background: #2a2a2a; */
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
    /* transform: translateY(-5px); */
}

.template-option.active {
    border-color: #e53230;
    /* background: rgba(231, 76, 60, 0.1); */
    color: white;
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.4);
}

.layout-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    background: #7f7a7a;
    padding: 12px;
    box-sizing: border-box;
}

.layout-preview div div {
    background: rgba(255, 255, 255, 0.5);
    border: 3px solid white;
}

.template-option h3 {
    color: #fff;
    text-align: center;
    padding: 12px 15px 5px;
    font-size: 18px;
}

.template-option h4 {
    color: #000;
    text-align: center;
    padding: 12px 15px 20px;
    font-size: 18px;
    font-weight: 600;
}

.template-option p:not(:last-child) {
    color: black;
    text-align: left;
    padding: 0 15px 12px;
    font-size: 13px;
}

.template-option p:last-child {
    text-align: center;
    padding: 0 15px 12px;
}

/* ===== UPLOAD SECTION ===== */

.upload-header-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e53230;
}

.upload-header-info h2 {
    color: #000;
    font-size: 24px;
    margin: 0;
    text-align: center;
    padding-bottom: 20px;
}

.btn-back {
    /* background: radial-gradient(circle,rgba(255, 0, 0, 1) 0%, rgba(136, 136, 136, 1) 100%); */
    background-color: #e53230;
    color: #fff;
    border: 1px solid #000;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    max-width: fit-content;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-back:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e53230;
    border-color: #e53230;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #e53230;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    background: rgba(231, 76, 60, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-box:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e53230;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

.upload-box.dragover {
    background: rgba(231, 76, 60, 0.15);
    border-color: #e53230;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.3);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #e53230;
    margin-bottom: 20px;
    stroke-width: 1.5;
}

.upload-box h3 {
    font-size: 22px;
    color: #000;
    margin-bottom: 8px;
}

.upload-box p {
    font-size: 14px;
    color: #7f7a7a;
}

.upload-header-info h2 {
    color: #7f7a7a;
    font-size: 24px;
    margin: 0;
}

.file-info {
    text-align: center;
}

.file-info p {
    color: #e53230;
    font-size: 15px;
}

/* Preview Section */
.preview-section {
    margin-bottom: 20px;
}

.preview-section h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
    border-bottom: 2px solid #e53230;
}

.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: #7f7a7a;
    padding: 40px;
    font-size: 14px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #333;
    aspect-ratio: 1;
    border: 2px solid #444;
    transition: all 0.3s ease;
}

.photo-item:hover {
    border-color: #e53230;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-number {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(231, 76, 60, 0.05);
    color: #000;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    border-radius: 0 0 6px 0;
}

.remove-photo {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 60, 60, 0.9);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 0 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0;
}

.photo-item:hover .remove-photo {
    opacity: 1;
}

.remove-photo:hover {
    background: rgba(255, 30, 30, 1);
}

.photo-checkbox {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #e53230;
}

.photo-checkbox:hover {
    transform: scale(1.1);
}

/* Action Buttons */
.upload-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn {
    padding: 15px 40px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: fit-content;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    /* background: radial-gradient(circle,rgba(255, 0, 0, 1) 0%, rgba(136, 136, 136, 1) 100%); */
    background-color: #e53230;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #000;
    border-radius: 6px;
    max-width: fit-content;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* .btn-primary:hover:not(:disabled) { */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4); */
/* } */

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.min-photos-note {
    color: #7f7a7a;
    font-size: 13px;
    margin-top: 5px;
    height: 18px;
}

/* ===== PREVIEW SCREEN ===== */

.preview-screen {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    min-height: 100vh;
    min-width: 1056px;
    gap: 15px;
    overflow: hidden;
    box-sizing: border-box;
}

.preview-header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-shrink: 0;
    gap: 20px;
    padding: 0 20px;
}

.preview-header h2 {
    font-size: 28px;
    color: #888;
    margin: 0;
}

.preview-header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.preview-canvas-container {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    overflow: auto;
    /* border-radius: 12px; */
    padding: 0;
    flex: 0 1 auto;
    max-height: 70vh;
    min-width: 1056px;
    box-sizing: border-box;
}

.preview-paper {
    background: white;
    /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); */
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: 100%;
    aspect-ratio: auto;
    min-width: 0;
    min-height: 0;
}

#confirmDownloadButton {
    width: fit-content;
    margin: 20px auto;
}

/* ===== SUCCESS SCREEN ===== */

.success-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    /* padding: 40px 20px; */
}

.success-message {
    text-align: center;
    background: rgba(0, 255, 100, 0.05);
    border: 2px solid #00ff64;
    border-radius: 12px;
    padding: 10px;
    max-width: 500px;
}

.success-icon {
    width: 60px;
    height: 60px;
    color: #00ff64;
    stroke-width: 3;
}

.success-message h2 {
    font-size: 24px;
    color: #000;
    margin-bottom: 15px;
}

.success-message p {
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-main {
        padding: 20px;
    }

    .user-info-card {
        padding: 30px 20px;
    }

    .user-info-card h2 {
        font-size: 22px;
    }

    /* .form-buttons {
        flex-direction: column;
    } */

    .section-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .template-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .template-option h4 {
        font-size: 14px;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .upload-box h3 {
        font-size: 18px;
    }

    .upload-icon {
        width: 45px;
        height: 45px;
    }

    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .btn {
        width: 100%;
        max-width: fit-content;
    }

    .upload-header-info {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-back {
        padding: 12px 15px;
        max-width: fit-content;
        font-size: 14px;
    }

    .preview-screen {
        min-width: 0;
        min-height: auto;
        padding: 15px 0;
        overflow: visible;
    }

    .preview-canvas-container {
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        padding: 0;
        justify-content: flex-start;
        display: block;
    }

    .preview-header {
        padding: 0 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .preview-header h2 {
        font-size: 20px;
    }


    .preview-header-buttons .btn-back {
        width: auto;
    }

    #confirmDownloadButton {
        margin: 15px auto;
    }

    .upload-container {
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .upload-main {
        overflow: visible;
        max-width: 100%;
    }
}

/* Mobile-specific styles for small phones */
@media (max-width: 480px) {
    .nav-main {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        max-width: 360px;
        justify-content: center;
        gap: 8px;
        padding: 0 10px 20px 10px;
    }

    .nav-main li {
        display: flex;
    }
    
    .nav-main li .cta-button {
    margin: 0;
    padding: 10px 12px;
    font-size: 12px;
    }

    .nav-footer {
        gap: 10px 16px;
        padding: 0 14px 20px 14px;
    }

    .nav-footer li a {
        font-size: 12px;
        white-space: nowrap;
    }

    .socials {
    display: flex;
    flex-direction: row;
    justify-content: center;
    max-width: 100%;
    padding-top: 10px;
    }

    .social-icon {
    max-width: 100%;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}
    
    .upload-header-info {
        place-items: center;
    }

    .upload-header h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .upload-header p {
        font-size: 14px;
    }

    .user-info-card {
        padding: 20px 15px;
        border-radius: 8px;
        max-width: 100%;
    }

    .user-info-card h2 {
        font-size: 20px;
        margin-bottom: 8px;
        text-align: center;
    }

    .user-info-card > p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .form-group {
        gap: 6px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .template-section {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .template-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .template-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-height: 160px;
        padding: 15px;
    }

    .layout-preview {
        min-width: 100%;
    }

    .template-option h4 {
        font-size: 14px;
        padding: 10px 10px 5px;
    }

    .template-option p {
        font-size: 13px;
        padding: 0 10px 8px;
    }

    .upload-box h3 {
        font-size: 16px;
    }

    .upload-icon {
        width: 40px;
        height: 40px;
    }

    .photos-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .upload-header-info {
        gap: 10px;
        margin-bottom: 20px;
    }

    .upload-header-info h2 {
        font-size: 20px;
    }
}

/* ===== IMAGE EDITOR SCREEN ===== */

.image-editor-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    gap: 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
}

.editor-header h2 {
    display: flex;
    flex-direction: column;
    font-size: 24px;
    color: #e53230;
    margin: 0;
}

.editor-header h2 span {
    color: #e53230;
    font-size: 18px;
    /* margin-left: 10px; */
}

.editor-container {
    display: flex;
    flex-direction: column;
}

/* ===== LANDING PAGE STYLES ===== */

.landing-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100%;
    background-color: white;
}

.landing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    color: #7f7a7a;
    border-bottom: 3px solid #e53230;
    padding-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.landing-logo img{
    padding-bottom: 20px;
}

.landing-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
    color: #7f7a7a;
    font-weight: 700;
    font-style: italic;
}

.landing-header p {
    font-size: 18px;
    opacity: 0.8;
    color: #999;
    margin-bottom: 30px;
}

.cta-button {
    /* background: radial-gradient(circle,rgba(255, 0, 0, 1) 0%, rgba(136, 136, 136, 1) 100%); */
    background-color: #e53230;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #000;
    border-radius: 6px;
    max-width: fit-content;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.5);
    background: radial-gradient(circle,rgba(136, 136, 136, 1) 0%, rgba(255, 0, 0, 1) 100%);
}

.features-section, .how-it-works, .socials-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background-color: #fff;
}

.landing-section-title {
    font-size: 36px;
    color: #7f7a7a;
    text-align: center;
    border-bottom: 3px solid #e53230;
    padding-bottom: 20px;
    width: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 20px;
}

.product-link {
    text-decoration: none;
    color: inherit;
}

.product-card {
    background: white;
    border: 2px solid #e53230;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(229, 50, 48, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(229, 50, 48, 0.25);
}

.product-preview {
    background: linear-gradient(135deg, #e53230 0%, #9c1a20 100%);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 30px;
    width: 100%;
}

.product-preview-grid > div {
    background: white;
    border-radius: 6px;
    opacity: 0.8;
}

.product-preview-polaroid .product-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    width: 75%;
    height: 80%;
}

.product-preview-bottom-bar {
    position: absolute;
    bottom: 30px;
    width: calc(100% - 60px);
    height: 70px;
    background: white;
    opacity: 0.3;
    border-radius: 2px;
}

.product-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.product-info p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.6;
    flex: 1;
}

.detail-link {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.detail-link span {
    font-size: 1.1em;
    color: #e53230;
    font-weight: 700;
}

.products-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0 20px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0 20px 0;
}

.feature-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    border-color: #e53230;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
    transform: translateY(-5px);
}

.feature-icon {
    text-align: center;
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-card h3 {
    text-align: center;
    color: #7f7a7a;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.feature-card p {
    color: #999;
    line-height: 1.6;
    font-size: 14px;
}

.templates-showcase {
    padding: 20px 0 20px 0;
    background-color: white;
}

.templates-showcase h2 {
    font-size: 36px;
    color: #7f7a7a;
    text-align: center;
    border-bottom: 3px solid #e53230;
    padding-bottom: 20px;
}

.template-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.template-showcase-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.template-showcase-card:hover {
    border-color: #e53230;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
}

.template-preview {
    background: #f5f5f5;
    border: 2px dashed #e53230;
    border-radius: 4px;
    /* padding: 20px 0 20px 0; */
    margin-bottom: 15px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e53230;
    font-size: 12px;
}

.template-showcase-card h4 {
    color: #7f7a7a;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.template-showcase-card p {
    color: #999;
    font-size: 13px;
    line-height: 1.4;
}

.how-it-works {
    padding-bottom: 20px;
    background: #fff;
}

.how-it-works h2 {
    font-size: 36px;
    color: #7f7a7a;
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 3px solid #e53230;
    padding-bottom: 20px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    /* background: radial-gradient(circle,rgba(255, 0, 0, 1) 0%, rgba(136, 136, 136, 1) 100%); */
    background-color: #e53230;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(104, 85, 83, 0.3);
}

.step h3 {
    color: #7f7a7a;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.step p {
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.landing-footer {
    background-color: #7f7a7a;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    margin-top: auto;
    border-top: 3px solid #e53230;
}

.landing-footer p {
    margin-bottom: 20px;
}

.cta-section {
    padding: 50px 20px;
    background: #fff;
    text-align: center;
    border-top: 3px solid #e53230;
}

.cta-section h2 {
    font-size: 32px;
    color: #7f7a7a;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-section p {
    font-size: 18px;
    color: #999;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .landing-header h1 {
        font-size: 32px;
    }

    .landing-header p {
        font-size: 16px;
    }

    .landing-section-title,
    .templates-showcase h2,
    .how-it-works h2 {
        font-size: 24px;
    }

    .features-grid,
    .template-showcase-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 90%;
    }
}

.editor-canvas-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    border: 2px solid #333;
    overflow: hidden;
    min-height: 350px;
    max-height: 65vh;
}

.editor-photo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 350px;
    max-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.editor-photo-wrapper img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    transition: none;
    z-index: 1;
}

.editor-photo-wrapper img:active {
    cursor: grabbing;
}

.crop-frame {
    position: absolute;
    border: 3px solid #e53230;
    box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 10;
}

.editor-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}

.zoom-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-rotate {
    background: #333;
    color: #fff;
    border: 2px solid #555;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-rotate:hover {
    background: #444;
    border-color: #e53230;
    color: #e53230;
}

.zoom-control label {
    color: #e53230;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zoom-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 3px;
    outline: none;
}

.zoom-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e53230;
    cursor: pointer;
}

.zoom-slider-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e53230;
    cursor: pointer;
    border: none;
}

.zoom-label {
    color: #b0b0b0;
    font-size: 18px;
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.zoom-value {
    color: #e53230;
    font-size: 14px;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.editor-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.control-info {
    text-align: center;
}

.control-info p {
    color: #b0b0b0;
    font-size: 14px;
    margin: 4px 0;
}

.control-info .cut-dimensions {
    color: #e53230;
    font-weight: 600;
    font-size: 15px;
}

.control-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    padding-bottom: 20px;
}

.control-buttons .btn {
    flex: 1;
}

.btn-secondary {
    background-color: #e53230;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #000;
    border-radius: 6px;
    max-width: fit-content;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: #444;
    border-color: #e53230;
    color: #e53230;
}

.btn-secondary:disabled,
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#goHomeButton a {
    text-decoration: none;
    color: #fff;
}

#doneEditingButton {
    width: 100%;
}

@media (max-width: 768px) {
    .editor-canvas-area {
        min-height: 280px;
    }

    /* .control-buttons {
        flex-direction: column;
    } */
}

@media (max-width: 480px) {
    .image-editor-screen {
        padding: 10px;
    }

    .editor-canvas-area {
        min-height: 240px;
        border-radius: 8px;
    }

    .editor-header h2 {
        font-size: 20px;
    }
}

/* ===== CART BADGE ===== */

.cart-badge {
    display: inline-block;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    padding: 0;
    margin-left: 5px;
    vertical-align: baseline;
    line-height: inherit;
    box-sizing: border-box;
    position: relative;
    top: -1px;
}

/* ===== CART PAGE ===== */

.cart-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    background-color: white;
    padding: 20px;
    place-items: center;
}

#cartItemsList {
    padding-top: 20px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
    align-items: start;
    gap: 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.cart-item-card:hover {
    border-color: #e53230;
}

.cart-item-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
    flex-shrink: 0;
    align-self: center;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin: 0 0 4px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.cart-item-meta {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cart-item-price {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    flex-shrink: 0;
    align-self: center;
}

.cart-item-edit {
    background: rgba(229, 50, 48, 0.08);
    border: 1px solid rgba(229, 50, 48, 0.25);
    color: #e53230;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 10px;
    border-radius: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    align-self: center;
}

.cart-item-edit:hover {
    background: rgba(229, 50, 48, 0.14);
    border-color: rgba(229, 50, 48, 0.45);
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    align-self: center;
}

.cart-item-remove:hover {
    color: #e53230;
    background: rgba(229, 50, 48, 0.08);
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 4px;
    border-top: 2px solid #e0e0e0;
    margin-top: 4px;
    font-size: 20px;
    color: #333;
}

.cart-shipping-note {
    margin: 0 4px 8px;
    text-align: right;
    font-size: 13px;
    color: #777;
}

.field-error {
    display: block;
    color: #e53230;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

input.input-error {
    border-color: #e53230 !important;
    box-shadow: 0 0 0 2px rgba(229, 50, 48, 0.2);
}

@media (max-width: 480px) {
    .cart-item-card {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb details remove"
            "thumb price edit";
        gap: 10px;
        padding: 10px 12px;
    }

    .cart-item-thumb {
        width: 56px;
        height: 56px;
        grid-area: thumb;
        align-self: start;
    }

    .cart-item-details {
        grid-area: details;
    }

    .cart-item-price {
        grid-area: price;
        justify-self: start;
    }

    .cart-item-edit {
        grid-area: edit;
        justify-self: start;
    }

    .cart-item-remove {
        grid-area: remove;
        justify-self: end;
        align-self: start;
    }

    .cart-item-name {
        font-size: 14px;
    }

    .cart-item-price {
        font-size: 14px;
    }

    .cart-summary {
        font-size: 17px;
    }

    .cart-shipping-note {
        font-size: 12px;
    }
}

/* ===== SAVE THE DATE PAGE STYLES ===== */

.save-the-date-card {
    background: linear-gradient(135deg, #e53230 0%, #9c1a20 100%);
    width: 325px;
    height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    /* border: 1px solid #888; */
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

.save-the-date-image-container {
    flex: 0 0 auto;
    width: 100%;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    border: 10px solid white;
    box-sizing: border-box;
}

.save-the-date-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.save-the-date-image-container:has(.save-the-date-image[src]) .save-the-date-image {
    display: block;
}

/* Editing view — image bleeds outside crop frame for easier repositioning */
.save-the-date-card.editing-active {
    overflow: visible;
}

.save-the-date-card.editing-active .save-the-date-image-container {
    overflow: visible;
}

.save-the-date-card.editing-active .crop-frame {
    display: block !important;
    position: absolute;
    inset: 0;
    border: 2px dashed rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 10;
    border-radius: 1px;
}

.save-the-date-text-banner {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #333;
    box-sizing: border-box;
    /* margin-top: -10px; */
    /* overflow: hidden; */
    /* z-index: 1; */
}

.save-the-date-preview h2 {
    font-family: 'Great Vibes', 'Brush Script MT', cursive;
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 20px;
    color: #c41e3a;
    font-style: italic;
}

.save-the-date-preview .couple-names {
    font-size: 28px;
    margin-bottom: 15px;
    color: #555;
}

.save-the-date-preview .event-details {
    font-size: 18px;
    margin-top: 25px;
    color: #666;
    line-height: 1.8;
}

/* Save the Date - Responsive Design */
@media (max-width: 768px) {
    .save-the-date-card {
        max-width: 100%;
    }
}

.product-page .form-group {
    margin-bottom: 5px;
}

.product-page .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}

.product-page .form-group input,
.product-page .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #333;
    font-size: 14px;
}

.product-page .form-group input:focus,
.product-page .form-group select:focus {
    outline: none;
    border-color: #e53230;
    box-shadow: 0 0 5px rgba(229, 50, 48s, 0.3);
}

.product-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.product-customization {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
}

.preview-container {
    margin-bottom: 30px;
}

.customization-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.font-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.font-preview {
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 16px;
    color: #e0e0e0;
    border: 1px solid #444;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.product-action {
    flex: 1;
    padding: 15px 30px;
    background-color: #ff6b9d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-action:hover:not(.disabled) {
    background-color: #ff5285;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.product-action.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.secondary-button {
    background-color: #444;
    color: #e0e0e0;
}

.secondary-button:hover {
    background-color: #555;
}

@media (max-width: 768px) {
    .product-page .form-row,
    .font-options {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .save-the-date-preview h2 {
        font-size: 36px;
    }

    .save-the-date-preview .couple-names {
        font-size: 22px;
    }
}