/**
 * Custom Shop & Product Page Styles
 * Dr. Giacomo Giuliano Theme
 *
 * Color Palette:
 * Primary: #f34e3a (Red-Orange)
 * Primary Dark: #f23621
 * Text: #5a5a5a (Gray)
 * Heading: #1a1a1a (Dark)
 * Background: #ffffff
 */

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.dgg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Shop Page Styles
   ========================================================================== */

.dgg-shop-wrapper {
    padding-bottom: 80px;
}

/* Shop Hero */
.dgg-shop-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    padding: 80px 0 60px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.dgg-shop-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(243,78,58,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.dgg-shop-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.dgg-shop-title {
    font-family: 'Teko', sans-serif;
    font-size: 64px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 0 20px;
    letter-spacing: 2px;
    color: #ffffff;
}

.dgg-shop-subtitle {
    font-family: 'Ubuntu', sans-serif;
    font-size: 20px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.dgg-shop-description {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Shop Toolbar */
.dgg-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.woocommerce-result-count {
    margin: 0;
    color: #5a5a5a;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-ordering select {
    padding: 10px 40px 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #5a5a5a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.woocommerce-ordering select:hover {
    border-color: #f34e3a;
}

/* Protocol Cards Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dgg-protocol-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.dgg-protocol-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(243, 78, 58, 0.15);
}

.dgg-protocol-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Protocol Image */
.dgg-protocol-image {
    position: relative;
    overflow: hidden;
    padding-top: 66.67%; /* 3:2 aspect ratio */
}

.dgg-protocol-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.dgg-protocol-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.dgg-protocol-card:hover .dgg-protocol-image img {
    transform: scale(1.1);
}

/* Protocol Badges */
.dgg-protocol-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.dgg-badge-sale {
    background: #f34e3a;
    color: #ffffff;
}

.dgg-badge-featured {
    background: #1a1a1a;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Protocol Content */
.dgg-protocol-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dgg-protocol-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.dgg-protocol-category {
    font-size: 11px;
    font-weight: 600;
    color: #f34e3a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dgg-protocol-title {
    margin: 0 0 15px;
    font-family: 'Teko', sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dgg-protocol-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dgg-protocol-title a:hover {
    color: #f34e3a;
}

.dgg-protocol-excerpt {
    color: #5a5a5a;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

/* Protocol Features */
.dgg-protocol-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.dgg-protocol-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5a5a5a;
}

.dgg-protocol-feature svg {
    color: #f34e3a;
    flex-shrink: 0;
}

/* Protocol Footer */
.dgg-protocol-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.dgg-protocol-price {
    font-family: 'Teko', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: #1a1a1a;
}

.dgg-protocol-price del {
    font-size: 24px;
    color: #999;
    margin-right: 8px;
}

.dgg-protocol-price ins {
    text-decoration: none;
    color: #f34e3a;
}

.dgg-protocol-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f34e3a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.dgg-protocol-button:hover {
    background: #f23621;
    transform: translateX(4px);
    color: #ffffff;
}

.dgg-protocol-button svg {
    transition: transform 0.3s ease;
}

.dgg-protocol-button:hover svg {
    transform: translateX(4px);
}

/* No Products */
.dgg-no-products {
    text-align: center;
    padding: 80px 20px;
}

.dgg-no-products-icon {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.dgg-no-products h2 {
    font-family: 'Teko', sans-serif;
    font-size: 36px;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.dgg-no-products p {
    color: #5a5a5a;
    margin-bottom: 30px;
}

/* Pagination */
.dgg-shop-pagination {
    margin-top: 60px;
    text-align: center;
}

.woocommerce-pagination {
    display: inline-flex;
    gap: 8px;
}

.woocommerce-pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination li {
    margin: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #5a5a5a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.woocommerce-pagination a:hover,
.woocommerce-pagination span.current {
    background: #f34e3a;
    border-color: #f34e3a;
    color: #ffffff;
}

/* ==========================================================================
   Single Product Page Styles
   ========================================================================== */

.dgg-single-protocol {
    padding-bottom: 60px;
}

/* Protocol Hero */
.dgg-protocol-hero {
    padding: 60px 0;
    background: #ffffff;
}

.dgg-protocol-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Product Gallery */
.dgg-protocol-gallery {
    position: sticky;
    top: 100px;
}

.woocommerce-product-gallery {
    margin: 0;
}

.woocommerce-product-gallery__wrapper {
    margin: 0;
}

.woocommerce-product-gallery__image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.woocommerce-product-gallery__image img {
    width: 100%;
    display: block;
}

/* Product Summary */
.dgg-protocol-summary {
    padding: 20px 0;
}

.dgg-protocol-cats {
    margin-bottom: 15px;
}

.dgg-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f34e3a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-right: 8px;
}

.dgg-protocol-name {
    font-family: 'Teko', sans-serif;
    font-size: 56px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 20px;
    color: #1a1a1a;
    line-height: 1.2;
}

.dgg-protocol-pricing {
    margin-bottom: 25px;
}

.dgg-protocol-pricing .price {
    font-family: 'Teko', sans-serif;
    font-size: 48px;
    font-weight: 500;
    color: #f34e3a;
}

.dgg-protocol-pricing .price del {
    font-size: 32px;
    color: #999;
    margin-right: 12px;
}

.dgg-protocol-intro {
    font-size: 18px;
    line-height: 1.8;
    color: #5a5a5a;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

/* Key Features */
.dgg-protocol-key-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.dgg-key-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 3px solid #f34e3a;
}

.dgg-key-feature-icon {
    flex-shrink: 0;
}

.dgg-key-feature-icon svg {
    color: #f34e3a;
}

.dgg-key-feature-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dgg-key-feature-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dgg-key-feature-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Add to Cart Form */
.dgg-protocol-cart-form {
    margin-bottom: 30px;
}

.dgg-protocol-cart-form .cart {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.dgg-protocol-cart-form .quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px;
}

.dgg-protocol-cart-form .quantity input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 8px;
}

.dgg-protocol-cart-form .single_add_to_cart_button {
    flex: 1;
    padding: 18px 40px;
    background: #f34e3a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dgg-protocol-cart-form .single_add_to_cart_button:hover {
    background: #f23621;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(243, 78, 58, 0.3);
}

/* Virtual product - full width button */
.dgg-protocol-cart-form form.cart:not(.variations_form) .single_add_to_cart_button {
    width: 100%;
}

/* Loading state for add to cart */
.dgg-protocol-cart-form .single_add_to_cart_button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.dgg-protocol-cart-form .single_add_to_cart_button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Added to cart state */
.dgg-protocol-cart-form .single_add_to_cart_button.added {
    background: #00a32a;
}

.dgg-protocol-cart-form .single_add_to_cart_button.added::before {
    content: '✓ ';
}

/* Trust Badges */
.dgg-protocol-trust {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 8px;
}

.dgg-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #5a5a5a;
}

.dgg-trust-item svg {
    color: #f34e3a;
    flex-shrink: 0;
}

/* Benefits Section */
.dgg-protocol-benefits-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
}

.dgg-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.dgg-section-title {
    font-family: 'Teko', sans-serif;
    font-size: 48px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.dgg-section-subtitle {
    font-size: 18px;
    color: #5a5a5a;
    margin: 0;
}

.dgg-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.dgg-benefit-card {
    padding: 35px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.4s ease;
}

.dgg-benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.dgg-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f34e3a 0%, #f23621 100%);
    border-radius: 50%;
    margin-bottom: 25px;
}

.dgg-benefit-icon svg {
    color: #ffffff;
}

.dgg-benefit-title {
    font-family: 'Teko', sans-serif;
    font-size: 24px;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.dgg-benefit-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #5a5a5a;
    margin: 0;
}

.dgg-benefits-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dgg-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    line-height: 1.6;
    color: #5a5a5a;
}

.dgg-benefit-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f34e3a;
    border-radius: 50%;
}

.dgg-benefit-check svg {
    color: #ffffff;
}

/* Description Section */
.dgg-protocol-description-section {
    padding: 80px 0;
    background: #ffffff;
}

.dgg-protocol-description-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: #5a5a5a;
}

.dgg-protocol-description-content h2,
.dgg-protocol-description-content h3 {
    font-family: 'Teko', sans-serif;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-top: 40px;
    margin-bottom: 20px;
}

.dgg-protocol-description-content h2 {
    font-size: 36px;
}

.dgg-protocol-description-content h3 {
    font-size: 28px;
}

/* What's Included Section */
.dgg-protocol-included-section {
    padding: 80px 0;
    background: #f8f8f8;
}

.dgg-included-content {
    max-width: 900px;
    margin: 0 auto;
}

.dgg-included-content ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dgg-included-content li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dgg-included-content li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f34e3a;
    color: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: bold;
}

/* CTA Section */
.dgg-protocol-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.dgg-cta-box {
    text-align: center;
    padding: 60px 40px;
}

.dgg-cta-title {
    font-family: 'Teko', sans-serif;
    font-size: 48px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 15px;
    color: #ffffff;
}

.dgg-cta-text {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px;
}

.dgg-cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.dgg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 8px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.dgg-button-primary {
    background: #f34e3a;
    color: #ffffff;
}

.dgg-button-primary:hover {
    background: #f23621;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(243, 78, 58, 0.3);
}

.dgg-button-outline {
    background: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.dgg-button-outline:hover {
    background: #ffffff;
    color: #1a1a1a;
}

.dgg-button-large {
    padding: 20px 48px;
    font-size: 18px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .dgg-shop-title {
        font-size: 48px;
    }

    .dgg-protocol-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .dgg-protocol-gallery {
        position: relative;
        top: 0;
    }

    .dgg-protocol-name {
        font-size: 42px;
    }

    .dgg-section-title {
        font-size: 36px;
    }

    .products {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .dgg-shop-hero {
        padding: 60px 0 40px;
    }

    .dgg-shop-title {
        font-size: 36px;
    }

    .dgg-shop-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .dgg-protocol-key-features {
        grid-template-columns: 1fr;
    }

    .dgg-protocol-name {
        font-size: 32px;
    }

    .dgg-protocol-cart-form .cart {
        flex-direction: column;
    }

    .dgg-cta-title {
        font-size: 32px;
    }

    .dgg-cta-actions {
        flex-direction: column;
    }

    .dgg-button {
        width: 100%;
    }

    .products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 544px) {
    .dgg-container {
        padding: 0 15px;
    }

    .dgg-shop-title {
        font-size: 28px;
    }

    .dgg-protocol-title {
        font-size: 22px;
    }

    .dgg-benefits-grid {
        grid-template-columns: 1fr;
    }

    .dgg-section-title {
        font-size: 28px;
    }
}
