/* Base Container Styles */
.brand-template,
.brand-template-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-size: 1.4em;
    width: 90%;
}

/* Header Styles - Logged In */
.brand-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.brand-logo {
    max-width: 400px;
    height: auto;
}

/* Header Styles - Public View */
.brand-header-simple {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.brand-header-simple .brand-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 1.5rem;
}

.brand-description {
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

/* Brand Sections */
.brand-section {
    margin-bottom: 4rem;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.brand-section:last-child {
    border-bottom: none;
}

.brand-section h2 {
    color: #722F37;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Video Player Styles */
.custom-video-player {
    position: relative;
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 15px 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 3;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group.left {
    flex: 0 0 auto;
}

.control-group.right {
    flex: 0 0 auto;
}

/* Progress Bar */
.progress-bar {
    flex: 1;
    margin: 0 15px;
}

.progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #aabca3;
    border-radius: 2px;
    width: 0%;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 12px;
    margin-top: 5px;
}

/* Control Buttons */
.video-controls button {
    background: none;
    border: none;
    padding: 5px;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    min-width: 24px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-controls button:hover {
    opacity: 1;
}

.video-controls svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.volume-slider {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.volume-control:hover .volume-slider {
    width: 60px;
}

.volume-track {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 100%;
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 2;
    cursor: pointer;
}

.video-player.playing .play-button-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-button svg {
    width: 40px;
    height: 40px;
    color: #722F37;
    margin-left: 5px;
}

.play-button:hover {
    transform: scale(1.1);
    background: #fff;
}

/* Content Areas */
.content-area {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin: 2rem 0;
}

/* Winemaker Section */
.winemaker-section {
    background: #f8f8f8;
    padding: 4rem 0;
    margin-top: 6rem;
}

.winemaker-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.winemaker-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    padding: 2rem;
}

.winemaker-photo {
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.winemaker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.winemaker-info {
    flex: 1;
}

.winemaker-name {
    color: #722F37;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.winemaker-bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* Wines Grid */
.wine-finder-grid {
    margin-top: 3rem;
    width: 100%;
}

.wine-finder-grid.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 350px));
    gap: 2rem;
    width: 100%;
    justify-content: center;
}

.wine-finder-grid.small-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.wine-finder-grid.small-grid.items-1 {
    grid-template-columns: minmax(250px, 350px);
}

.wine-finder-grid.small-grid.items-2 {
    grid-template-columns: repeat(2, minmax(250px, 350px));
}

.wine-finder-grid.small-grid.items-3 {
    grid-template-columns: repeat(3, minmax(250px, 350px));
}

/* Wine Item Styles */
.wine-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
}

.wine-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wine-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wine-image {
    position: relative;
    padding-bottom: 133%;
    background: #f8f8f8;
    overflow: hidden;
}

.wine-image img {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.wine-item:hover .wine-image img {
    transform: scale(1.05);
}

/* Wine Info Styles */
.brand-template-public .wine-info {
    padding: 1.5rem;
    text-align: left;
}

.brand-template-public .wine-info h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: #722F37;
    line-height: 1.3;
    font-family: 'Playfair Display', serif;
    text-align: left;
}

.brand-template-public .wine-origin {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    text-align: left;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .brand-template,
    .brand-template-public {
        padding: 1.5rem;
    }

    .brand-logo {
        max-width: 300px;
    }

    .wine-finder-grid.grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 350px));
        gap: 2rem;
    }

    .wine-finder-grid.small-grid.items-2,
    .wine-finder-grid.small-grid.items-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 350px));
    }
}

@media (max-width: 980px) {
    .winemaker-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .winemaker-photo {
        margin: 0 auto;
    }

    .wine-info h3 {
        font-size: 1.1rem;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button svg {
        width: 30px;
        height: 30px;
    }

    .volume-control:hover .volume-slider {
        width: 40px;
    }
}

@media (max-width: 768px) {
    .brand-template,
    .brand-template-public {
        padding: 1rem;
        font-size: 1em;
        width: 90%;
    }

    .brand-header,
    .brand-header-simple {
        margin-bottom: 3rem;
        padding: 1rem 0;
    }

    .brand-description {
        margin-bottom: 3rem;
    }

    .brand-logo {
        max-width: 250px;
    }

    .wine-finder-grid.grid {
        margin-top: 2rem;
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 1rem;
    }

    .wine-finder-grid.small-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
    
    .wine-finder-grid.small-grid.items-1 {
        grid-template-columns: minmax(150px, 300px);
    }

    .winemaker-section {
        margin-top: 4rem;
        padding: 3rem 0;
    }

    .winemaker-photo {
        width: 200px;
        height: 200px;
    }

    .brand-template-public .wine-info {
        padding: 1rem;
    }

    .brand-template-public .wine-info h3 {
        font-size: 1rem;
    }

    .brand-template-public .wine-origin {
        font-size: 0.8rem;
    }

    .wine-item {
        max-width: 300px;
    }

    .video-controls {
        padding: 15px 10px 8px;
    }
}

@media (max-width: 480px) {
    .brand-header-simple {
        margin-bottom: 2rem;
    }

    .brand-description {
        margin-bottom: 2rem;
    }

    .wine-finder-grid.grid {
        margin-top: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .wine-finder-grid.small-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wine-finder-grid.small-grid.items-1 {
        grid-template-columns: 1fr;
    }

    .wine-info {
        padding: 0.75rem;
    }

    .winemaker-section {
        margin-top: 3rem;
        padding: 2rem 0;
    }

    .brand-section h2 {
        font-size: 1.5rem;
    }

    .winemaker-name {
        font-size: 1.3rem;
    }

    .wine-item {
        max-width: none;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }

    .play-button svg {
        width: 25px;
        height: 25px;
    }
}

/* Print Styles */
@media print {
    .brand-template,
    .brand-template-public {
        padding: 0;
    }

    .video-container,
    .file-downloads {
        display: none;
    }

    .wine-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
/* Fullscreen Styles */
.custom-video-player:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
}

.custom-video-player:fullscreen .video-container {
    height: 100vh;
    padding-bottom: 0;
}

.custom-video-player:fullscreen .video-player {
    position: static;
}

.custom-video-player:fullscreen video {
    height: 100vh;
    max-height: none;
}

/* Hide pause icon by default */
.pause-icon {
    display: none;
}

/* Show pause icon when playing */
.video-player.playing .pause-icon {
    display: block;
}

.video-player.playing .play-icon {
    display: none;
}

/* Brands Archive Grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 0 auto;
    max-width: 1200px;
    width: 90%;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.brand-link {
    display: block;
    text-decoration: none;
    width: 100%;
    text-align: center;
}

.brand-logo {
    max-width: 200px;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.brand-name {
    color: #722F37;
    font-size: 1.5rem;
    margin: 0;
}

/* Responsive styles for brands archive */
@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .brand-item {
        padding: 1.5rem;
    }

    .brand-logo {
        max-width: 150px;
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .brands-grid {
        gap: 1rem;
    }

    .brand-item {
        padding: 1rem;
    }
}

/* iOS-specific styles */
@supports (-webkit-touch-callout: none) {
    .video-container video {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
    }
    
    .video-container {
        background: #000;
    }
}
/* Ordered List Styles */
.brand-section .content-area ol {
    list-style: decimal;
    margin-left: 20px;
    padding-left: 20px;
}

.brand-section .content-area ol li {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Make numbers stand out */
.brand-section .content-area ol {
    counter-reset: item;
    list-style-type: none;
    margin-left: 0;
}

.brand-section .content-area ol li {
    counter-increment: item;
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
}

.brand-section .content-area ol li:before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: -2px;
    background: #722F37;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}
/* File Downloads Section */
.file-downloads {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #666;
    transition: color 0.3s ease;
}

.file-action:hover {
    color: #722F37;
}

.file-action svg {
    width: 16px;
    height: 16px;
}

.file-label {
    color: #666;
    flex: 1;
}

/* Email and Download Icons */
.file-item .file-action.email,
.file-item .file-action.download,
.file-item .file-action.retail {
    cursor: pointer;
}

.file-item .file-action.email:hover,
.file-item .file-action.download:hover,
.file-item .file-action.retail:hover {
    color: #722F37;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .file-downloads {
        margin-top: 0.75rem;
    }

    .file-item {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .file-item {
        font-size: 0.8rem;
    }
}

